OpenCores
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] - Blame information for rev 783

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/6709 (DR 743)
2
// PR c++/42603 (DR 950)
3
// { dg-options -std=c++0x }
4
 
5
template 
6
T make();
7
 
8
struct p { typedef int t; };
9
struct c : decltype(make

()) {};

10
 
11
decltype(make

())::t t;

12
 
13
// PR c++/49823
14
 
15
template < typename T >
16
auto f( const T &x )
17
  -> typename decltype( x )::type; // ICE on here
18
 
19
template < typename T >
20
typename decltype( T{} )::type // ICE on here
21
f( T );
22
 
23
template < typename T >
24
void f( T x )
25
{ typename decltype( x )::type t; } // ICE on here
26
 
27
// Negative tests
28
 
29
int f();
30
decltype(f())::t t2;            // { dg-error "not a class" }
31
 
32
struct D: decltype(f()) { };    // { dg-error "not a class" }
33
 
34
// { dg-prune-output "expected initializer" }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.