Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / noexcept67.C
blob7f0610343231fce0d9957e472df1e603b5e5e182
1 // PR c++/100101
2 // { dg-do compile { target c++11 } }
4 template <typename T> struct A
6     template <typename U> static char foo(U*, int* = 0);
7     static const bool value = sizeof(foo(static_cast<T*>(nullptr))) > 0;
8 };
10 template <bool b> struct B
12     static const bool value = b;
15 template <typename T> struct C
17     typedef B<A<T>::value> type;
20 template <typename T>
21 void bar() noexcept(A<T>::value && C<T>::type::value) {}
23 void baz()
25   bar<void>();