2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / constexpr-if1.C
blob416d9ec7129ca6876e78a755c742a238c66ff93e
1 // Testcase from P0292R2
2 // { dg-do compile { target c++11 } }
3 // { dg-options "" }
5 template<typename T, typename ... Rest> void g(T&& p, Rest&& ...rs) {
6   // ... handle p
7   if constexpr (sizeof...(rs) > 0) // { dg-warning "constexpr" "" { target c++14_down } }
8     g(rs...);  // never instantiated with an empty argument list.
11 int main()
13   g(1,2,3);