diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
| commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
| tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /test/SemaCXX/underlying_type.cpp | |
| parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) | |
Notes
Diffstat (limited to 'test/SemaCXX/underlying_type.cpp')
| -rw-r--r-- | test/SemaCXX/underlying_type.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/underlying_type.cpp b/test/SemaCXX/underlying_type.cpp index dd019ae6e2775..87f3b92802ad3 100644 --- a/test/SemaCXX/underlying_type.cpp +++ b/test/SemaCXX/underlying_type.cpp @@ -62,3 +62,17 @@ enum E {}; void PR26014() { f<E>(0); } // should not yield an ambiguity error. template<typename ...T> void f(__underlying_type(T) v); // expected-error {{declaration type contains unexpanded parameter pack 'T'}} + +namespace PR23421 { +template <class T> +using underlying_type_t = __underlying_type(T); +// Should not crash. +template <class T> +struct make_unsigned_impl { using type = underlying_type_t<T>; }; +using AnotherType = make_unsigned_impl<E>::type; + +// also should not crash. +template <typename T> +__underlying_type(T) ft(); +auto x = &ft<E>; +} |
