diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CompileFeatures/cxx_decltype_incomplete_return_types.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/cxx_decltype_incomplete_return_types.cpp b/Tests/CompileFeatures/cxx_decltype_incomplete_return_types.cpp new file mode 100644 index 0000000..109d038 --- /dev/null +++ b/Tests/CompileFeatures/cxx_decltype_incomplete_return_types.cpp @@ -0,0 +1,14 @@ + +template<class T> +struct A +{ + ~A() = delete; +}; + +template<class T> auto h() -> A<T>; +template<class T> auto i(T) -> T; +template<class T> auto f(T) -> decltype(i(h<T>())); +template<class T> auto f(T) -> void; +auto g() -> void { + f(42); +} |