OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [sfinae23.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/48647
2
// { dg-options -std=c++0x }
3
 
4
template< class T >
5
T&& declval();
6
 
7
template< class T, class U >
8
decltype( true ? declval() : declval() ) test( int );
9
 
10
template< class T, class U >
11
void test( ... );
12
 
13
 
14
template< class T, class U >
15
struct is_same {
16
  static const bool value = false;
17
};
18
 
19
template< class T >
20
struct is_same {
21
  static const bool value = true;
22
};
23
 
24
#define SA(X) static_assert ((X),#X)
25
 
26
typedef decltype( test(0) ) void_expected;
27
SA ((is_same::value));
28
SA ((!is_same::value));

powered by: WebSVN 2.1.0

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