diff options
Diffstat (limited to 'test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp')
-rw-r--r-- | test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp index 4dc393d..70c9aeb 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp @@ -3,3 +3,5 @@ auto a() -> int; // ok const auto b() -> int; // expected-error {{function with trailing return type must specify return type 'auto', not 'auto const'}} auto *c() -> int; // expected-error {{function with trailing return type must specify return type 'auto', not 'auto *'}} +auto (d() -> int); // expected-error {{trailing return type may not be nested within parentheses}} +auto e() -> auto (*)() -> auto (*)() -> void; // ok: same as void (*(*e())())(); |