URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
// { dg-do "compile" }
|
// { dg-do "compile" }
|
// { dg-options "-std=gnu++0x" }
|
// { dg-options "-std=gnu++0x" }
|
|
|
template
|
template
|
struct is_same
|
struct is_same
|
{
|
{
|
static const bool value = false;
|
static const bool value = false;
|
};
|
};
|
|
|
template
|
template
|
struct is_same
|
struct is_same
|
{
|
{
|
static const bool value = true;
|
static const bool value = true;
|
};
|
};
|
|
|
template const T& foo();
|
template const T& foo();
|
|
|
|
|
int i;
|
int i;
|
|
|
template
|
template
|
struct A
|
struct A
|
{
|
{
|
double x;
|
double x;
|
};
|
};
|
|
|
const A* a = new A();
|
const A* a = new A();
|
|
|
static_assert(is_same()), const int&>::value,
|
static_assert(is_same()), const int&>::value,
|
"type should be const int&");
|
"type should be const int&");
|
static_assert(is_same::value,
|
static_assert(is_same::value,
|
"type should be int");
|
"type should be int");
|
static_assert(is_samex), double>::value,
|
static_assert(is_samex), double>::value,
|
"type should be double");
|
"type should be double");
|
static_assert(is_samex)), const double&>::value,
|
static_assert(is_samex)), const double&>::value,
|
"type should be const double&");
|
"type should be const double&");
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.