Message ID | 20190514211759.GH18891@redhat.com |
---|---|
State | New |
Headers | show |
Series | C++ PATCH to add test for c++/68918 | expand |
diff --git gcc/testsuite/g++.dg/cpp0x/decltype71.C gcc/testsuite/g++.dg/cpp0x/decltype71.C new file mode 100644 index 00000000000..24c3abfba49 --- /dev/null +++ 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<typename X> + auto c() -> decltype( this->a() ) + {} + + template<typename X> + auto d() const -> decltype( a() ) + {} + + template<typename X> + auto e() const -> decltype( this->a() ) + {} +}; + +int main() +{ +}