Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp0x/decltype59.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR c++/57543 // { dg-do compile { target c++11 } } template< typename > struct X { void foo(); auto bar() -> decltype( X::foo() ); }; template< typename > struct Y { void foo(); template< typename > auto bar() -> decltype( Y::foo() ); }; template< typename > struct Z { void foo(); template< typename T > auto bar() -> decltype( T::foo() ); }; template< typename > struct K { void foo(); template< typename T > auto bar() -> decltype( T::foo() ); }; template<> template<> auto K<int>::bar<K<int>>() -> decltype( K<int>::foo() ); int main() { X<int>().bar(); Y<int>().bar<double>(); Z<int>().bar<Z<int>>(); K<int>().bar<K<int>>(); }