gcc/testsuite/g++.dg/cpp0x/alias-decl-31.C
raw| 1 | // Origin: PR c++/55663 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template <typename> |
| 5 | constexpr bool the_truth () { return true; } |
| 6 | |
| 7 | template <bool> |
| 8 | struct Takes_bool { }; |
| 9 | |
| 10 | template<bool B> |
| 11 | using Alias = Takes_bool<B>; |
| 12 | |
| 13 | template<typename T> |
| 14 | struct test { using type = Alias<the_truth<T>()>; }; |
| 15 | |
| 16 | int main () { |
| 17 | test<int> a; |
| 18 | |
| 19 | return 0; |
| 20 | } |