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

// Test conversion to bool

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

void fun()
{
  assert_true(nullptr ? false : true);
  decltype(nullptr) mynull = 0;
  assert_true(mynull ? false : true);
}