summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/nullptr13.C
blob: a9377584c56a2b3916b9e21cee919221056e0276 (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 typeid

#include <typeinfo>

#define assert_true(b) do { char c[2 * bool(b) - 1]; } while(0)

void fun()
{
  typeid(nullptr);
  const decltype(nullptr) mynull = 0;
  typeid(mynull);
  assert_true(typeid(nullptr) == typeid(mynull));
}