]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/constexpr-targ2.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-targ2.C
CommitLineData
4b7c558d
JM
1// PR c++/65498
2// { dg-do compile { target c++11 } }
3
4template <typename, typename>
5struct is_same
6{
7 enum { value = false };
8 constexpr bool operator()() const noexcept { return value; }
9};
10
11template <typename T>
12struct is_same<T, T>
13{
14 enum { value = true };
15 constexpr bool operator()() const noexcept { return value; }
16};
17
18template <bool, typename = void>
19struct enable_if { };
20
21template <typename T>
22struct enable_if<true, T> { typedef T type; };
23
24struct A;
25
26template <typename, typename = void>
27struct F { };
28
29template <typename X>
30struct F<X, typename enable_if<is_same<X, A>{}()>::type> {
31 template <typename MakeDependent>
32 F(MakeDependent) {
33 auto ICE_HERE = __func__;
34 (void)ICE_HERE; // avoid -Wunused-variable
35 }
36};
37
38int main() {
39 F<A>{1};
40}
This page took 3.606948 seconds and 5 git commands to generate.