OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [temp_default1.C] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// { dg-options "-std=c++0x" }
2
 
3
template
4
struct is_same
5
{
6
  static const bool value = false;
7
};
8
 
9
template
10
struct is_same {
11
  static const bool value = true;
12
};
13
 
14
template void f()
15
{
16
  static_assert(is_same::value,
17
                "T can only be instantiated with an int");
18
}
19
 
20
template
21
void f(U)
22
{
23
  static_assert(is_same::value,
24
                "T can only be instantiated with an int");
25
}
26
 
27
void g()
28
{
29
  float pi = 3.14159;
30
  f();
31
  f(pi);
32
}

powered by: WebSVN 2.1.0

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