URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [decltype21.C] - Rev 693
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/6709 (DR 743)
// PR c++/42603 (DR 950)
// { dg-options -std=c++0x }
template <class T>
T make();
struct p { typedef int t; };
struct c : decltype(make<p>()) {};
decltype(make<p>())::t t;
// PR c++/49823
template < typename T >
auto f( const T &x )
-> typename decltype( x )::type; // ICE on here
template < typename T >
typename decltype( T{} )::type // ICE on here
f( T );
template < typename T >
void f( T x )
{ typename decltype( x )::type t; } // ICE on here
// Negative tests
int f();
decltype(f())::t t2; // { dg-error "not a class" }
struct D: decltype(f()) { }; // { dg-error "not a class" }
// { dg-prune-output "expected initializer" }
Go to most recent revision | Compare with Previous | Blame | View Log