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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/48450
2
// { dg-options -std=c++0x }
3
 
4
namespace std {
5
  template  T&& declval();
6
};
7
 
8
template
9
  class = decltype(static_cast(std::declval()))
10
>
11
char f(int);
12
 
13
template
14
char (&f(...))[2];
15
 
16
struct A { virtual ~A() = 0; };
17
struct B {};
18
struct D : B {};
19
 
20
static_assert(sizeof(f(0)) != 1, "Error"); // a
21
static_assert(sizeof(f(0)) != 1, "Error"); // b
22
static_assert(sizeof(f(0)) != 1, "Error"); // c
23
static_assert(sizeof(f(0)) != 1, "Error"); // d
24
static_assert(sizeof(f(0)) != 1, "Error"); // e

powered by: WebSVN 2.1.0

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