diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-08 01:27:29 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-08 01:27:29 +0000 |
| commit | c88aa3f3a6f0bf41453a27e13e09d5279e67f08f (patch) | |
| tree | 1bd0899451b7d2a6fbbd8bb671d967354d462bf3 /clang/test | |
| parent | 8f8697f3e185364129e35335e53e868761d35d1a (diff) | |
| download | bcm5719-llvm-c88aa3f3a6f0bf41453a27e13e09d5279e67f08f.tar.gz bcm5719-llvm-c88aa3f3a6f0bf41453a27e13e09d5279e67f08f.zip | |
Diagnose an attempt to give a deduction-guide a function body.
llvm-svn: 294397
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CXX/temp/temp.deduct.guide/p1.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/CXX/temp/temp.deduct.guide/p1.cpp b/clang/test/CXX/temp/temp.deduct.guide/p1.cpp index fb0a26a5c73..8dd0720669a 100644 --- a/clang/test/CXX/temp/temp.deduct.guide/p1.cpp +++ b/clang/test/CXX/temp/temp.deduct.guide/p1.cpp @@ -77,11 +77,11 @@ const volatile static constexpr inline A(int(&)[29]) -> A<int>; // expected-erro A(int(&)[30]) const -> A<int>; // expected-error {{deduction guide cannot have 'const' qualifier}} -// FIXME: No definition is allowed. -A(int(&)[40]) -> A<int> {} -A(int(&)[41]) -> A<int> = default; // expected-error {{only special member functions may be defaulted}} -A(int(&)[42]) -> A<int> = delete; -A(int(&)[43]) -> A<int> try {} catch (...) {} +// No definition is allowed. +A(int(&)[40]) -> A<int> {} // expected-error {{deduction guide cannot have a function definition}} +A(int(&)[41]) -> A<int> = default; // expected-error {{deduction guide cannot have a function definition}} expected-error {{only special member functions may be defaulted}} +A(int(&)[42]) -> A<int> = delete; // expected-error {{deduction guide cannot have a function definition}} +A(int(&)[43]) -> A<int> try {} catch (...) {} // expected-error {{deduction guide cannot have a function definition}} #ifdef CLASS }; |

