aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr02.C
blob: 50b3d0741b95f5137b957125d93e6dce1458245c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-do compile { target c++11 } }

// Test assignment to nullptr_t

typedef decltype(nullptr) nullptr_t;

const nullptr_t np1 = nullptr;
const nullptr_t np2 = __null;
const nullptr_t np3 = 0;
const nullptr_t np4 = np1;
const nullptr_t np5 = np2;
const nullptr_t np6 = np3;
const nullptr_t np7 = np4;
const nullptr_t np8 = np5;
const nullptr_t np9 = np6;