gcc/testsuite/g++.dg/cpp0x/nullptr39.C
raw| 1 | // PR c++/81671 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | namespace std { typedef decltype(nullptr) nullptr_t; } |
| 5 | |
| 6 | template<class R, class CB> struct Bar |
| 7 | {}; |
| 8 | template<class R> struct Bar<R, std::nullptr_t> |
| 9 | { |
| 10 | template<std::nullptr_t> struct Bind { constexpr static int const cb = 0; }; |
| 11 | }; |
| 12 | int foo() |
| 13 | { |
| 14 | return Bar<int, decltype(nullptr)>::Bind<nullptr>::cb; |
| 15 | } |