diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template9.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template9.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template9.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template9.C new file mode 100644 index 000000000..0cfbb9044 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template9.C @@ -0,0 +1,16 @@ +// PR c++/60999 +// { dg-do compile { target c++11 } } + +template <typename A> +struct foo +{ +}; + +template<> +struct foo<int> +{ + static constexpr int code = 42; + unsigned int bar = static_cast<unsigned int>(code); +}; + +foo<int> a; |