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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/50324
2
// { dg-options -std=c++0x }
3
 
4
struct complete { };
5
struct incomplete;
6
 
7
template auto f(T *) -> decltype(T{}) *;
8
template char f(T);
9
 
10
int main()
11
{
12
  complete *p = 0;
13
  static_assert(sizeof(f(p)) == sizeof(void*), "");
14
  incomplete *q = 0;
15
  static_assert(sizeof(f(q)) == 1u, "");
16
}

powered by: WebSVN 2.1.0

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