summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/nullptr02.C
blob: 80977cb2f00e41670a227731bddf77c50c97dd25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do compile }
// { dg-options "-std=c++0x" }

// 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;