summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/nullptr12.C
blob: 1713259f103626a89a55dfae773475bce4a686d7 (plain)
1
2
3
4
5
6
7
8
// { dg-do compile }
// { dg-options "-std=c++0x" }

// Test sizeof

static_assert(sizeof(nullptr) == sizeof(void*), "sizeof(nullptr) is wrong");
const decltype(nullptr) mynull = 0;
static_assert(sizeof(mynull) == sizeof(void*), "sizeof(nullptr) is wrong");