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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [decltype6.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// { dg-do "compile" }
2
// { dg-options "-std=gnu++0x" }
3
 
4
template
5
struct is_same
6
{
7
  static const bool value = false;
8
};
9
 
10
template
11
struct is_same
12
{
13
  static const bool value = true;
14
};
15
 
16
template const T& foo();
17
 
18
 
19
int i;
20
 
21
template
22
struct A
23
{
24
  double x;
25
};
26
 
27
const A* a = new A();
28
 
29
static_assert(is_same()), const int&>::value,
30
              "type should be const int&");
31
static_assert(is_same::value,
32
              "type should be int");
33
static_assert(is_samex), double>::value,
34
              "type should be double");
35
static_assert(is_samex)), const double&>::value,
36
              "type should be const double&");

powered by: WebSVN 2.1.0

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