gcc/testsuite/g++.dg/cpp0x/alias-decl-mem1.C
raw| 1 | // PR c++/103968 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template <typename Opt, Opt const& options> |
| 5 | struct trait |
| 6 | { |
| 7 | template <typename T> |
| 8 | struct NonInstantiated{}; |
| 9 | }; |
| 10 | |
| 11 | struct Options {}; |
| 12 | |
| 13 | template <typename T> |
| 14 | struct Widget |
| 15 | { |
| 16 | static constexpr auto c_options = Options{}; |
| 17 | using Trait = trait<decltype(c_options), c_options>; |
| 18 | }; |
| 19 | |
| 20 | Widget<int>::Trait b{}; // Crashes GCC > 10.3 |