]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/constexpr-conv4.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-conv4.C
1 // PR c++/87145
2 // { dg-do compile { target c++11 } }
3
4 struct S {
5 int val;
6
7 constexpr operator int() const {
8 return static_cast<int>(val);
9 }
10 };
11
12 template<int N>
13 struct F { };
14
15 template<unsigned N>
16 constexpr void foo() {
17 F<int{N}> f;
18 F<S{N}> f2;
19 }
20
21 int
22 main()
23 {
24 foo<2>();
25 }
This page took 0.0388 seconds and 5 git commands to generate.