1 // PR c++/57901 2 // { dg-require-effective-target c++11 } 3 4 struct Z { 5 Z() = default; 6 Z(Z const&) = default; ZZ7 constexpr Z(Z&&) {} /* non-trivial (constexpr) move ctor */ 8 }; 9 10 template<typename T> fn0(T v)11constexpr int fn0(T v) { return 0; } 12 template<typename T> fn(T v)13constexpr int fn (T v) { return fn0(v); } 14 15 constexpr auto t0 = fn0(Z()); // OK! 16 constexpr auto t = fn (Z()); // error! (GCC 4.8.1) 17