From: Marek Polacek Date: Tue, 14 May 2019 21:19:01 +0000 (+0000) Subject: re PR c++/68918 (spurious "invalid use of incomplete type" in trailing return type) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9177a016508696e664df5fa20ce44565978c34c4;p=gcc.git re PR c++/68918 (spurious "invalid use of incomplete type" in trailing return type) PR c++/68918 * g++.dg/cpp0x/decltype71.C: New test. From-SVN: r271193 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3dfe6b0550d..93aa83b58c5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-05-14 Marek Polacek + PR c++/68918 + * g++.dg/cpp0x/decltype71.C: New test. + PR c++/70156 * g++.dg/init/static5.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype71.C b/gcc/testsuite/g++.dg/cpp0x/decltype71.C new file mode 100644 index 00000000000..24c3abfba49 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype71.C @@ -0,0 +1,25 @@ +// PR c++/68918 +// { dg-do compile { target c++11 } } + +struct foo { + static void a() {} + + auto b() const -> decltype( this->a() ) + {} + + template + auto c() -> decltype( this->a() ) + {} + + template + auto d() const -> decltype( a() ) + {} + + template + auto e() const -> decltype( this->a() ) + {} +}; + +int main() +{ +}