comparison gcc/testsuite/g++.dg/cpp0x/constexpr-ex2.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
16 template<int I> struct X { static const int i = I; }; 16 template<int I> struct X { static const int i = I; };
17 constexpr A a = 42; 17 constexpr A a = 42;
18 18
19 X<a> x; // OK: unique conversion to int 19 X<a> x; // OK: unique conversion to int
20 int ar[X<a>::i]; // also OK 20 int ar[X<a>::i]; // also OK
21 int ary[a]; // { dg-error "ambiguous|conversion|array" } ambiguous conversion 21 int ary[a]; // { dg-error "could not convert|ambiguous|conversion|array" } ambiguous conversion
22 22