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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-std=c++0x" }
3
 
4
// Test overload preference char*/int
5
 
6
template  struct tType_equal;
7
template  struct tType_equal { typedef void type; };
8
 
9
template 
10
inline typename tType_equal::type
11
type_equal(U) { }
12
 
13
char* f( char* );
14
int f( int );
15
long int f( long int );
16
 
17
void test_f()
18
{
19
  // Overloading cases
20
  //
21
  type_equal(f(nullptr));
22
  type_equal(f(0));
23
  decltype(nullptr) mynull = 0;
24
  type_equal(f(mynull));
25
}

powered by: WebSVN 2.1.0

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