Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/nullptr02.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 // { dg-do compile { target c++11 } } |
2 | |
3 // Test assignment to nullptr_t | |
4 | |
5 typedef decltype(nullptr) nullptr_t; | |
6 | |
7 const nullptr_t np1 = nullptr; | |
8 const nullptr_t np2 = __null; | |
9 const nullptr_t np3 = 0; | |
10 const nullptr_t np4 = np1; | |
11 const nullptr_t np5 = np2; | |
12 const nullptr_t np6 = np3; | |
13 const nullptr_t np7 = np4; | |
14 const nullptr_t np8 = np5; | |
15 const nullptr_t np9 = np6; |