Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp1z/constexpr-if1.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// Testcase from P0292R2 // { dg-do compile { target c++11 } } // { dg-options "" } template<typename T, typename ... Rest> void g(T&& p, Rest&& ...rs) { // ... handle p if constexpr (sizeof...(rs) > 0) // { dg-warning "constexpr" "" { target c++14_down } } g(rs...); // never instantiated with an empty argument list. } int main() { g(1,2,3); }