diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-04-06 08:17:15 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-08 09:05:57 (GMT) |
commit | 9a49fd21bedacdda51ecfa82a15a0e52dd64948f (patch) | |
tree | e96a14650a1088088c4f8c14e6249e785a58f926 /Tests | |
parent | 1889045ca672e295c18203401c27a9e62ff45424 (diff) | |
download | CMake-9a49fd21bedacdda51ecfa82a15a0e52dd64948f.zip CMake-9a49fd21bedacdda51ecfa82a15a0e52dd64948f.tar.gz CMake-9a49fd21bedacdda51ecfa82a15a0e52dd64948f.tar.bz2 |
Features: Add cxx_decltype_incomplete_return_types.
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); +} |