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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 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.