1 // PR c++/100101 2 // { dg-do compile { target c++11 } } 3 4 template <typename T> struct A 5 { 6 template <typename U> static char foo(U*, int* = 0); 7 static const bool value = sizeof(foo(static_cast<T*>(nullptr))) > 0; 8 }; 9 10 template <bool b> struct B 11 { 12 static const bool value = b; 13 }; 14 15 template <typename T> struct C 16 { 17 typedef B<A<T>::value> type; 18 }; 19 20 template <typename T> bar()21void bar() noexcept(A<T>::value && C<T>::type::value) {} 22 baz()23void baz() 24 { 25 bar<void>(); 26 } 27