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

Subversion Repositories openrisc

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

Go to most recent revision | 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 template deduction
5
 
6
typedef decltype(nullptr) nullptr_t;
7
 
8
template  struct tType_equal;
9
template  struct tType_equal { typedef void type; };
10
 
11
template 
12
inline typename tType_equal::type
13
type_equal(U) { }
14
 
15
template T h( T t );
16
 
17
void test_h()
18
{
19
  type_equal(h(0));
20
  type_equal(h(nullptr));
21
  type_equal(h((float*)nullptr));
22
  nullptr_t mynull = 0;
23
  type_equal(h(mynull));
24
  type_equal(h((float*)mynull));
25
}

powered by: WebSVN 2.1.0

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