// Testcase from P0859 // { dg-do compile { target c++14 } } template constexpr int f() { return T::value; } // { dg-error "int" } template void g(decltype(B ? f() : 0)); template void g(...); template void h(decltype(int{B ? f() : 0})); template void h(...); void x() { g(0); // OK, B ? f() : 0 is not potentially constant evaluated h(0); // error, instantiates f even though B evaluates to false and // list-initialization of int from int cannot be narrowing }