Add support for C++0x nullptr.
[official-gcc/constexpr.git] / gcc / testsuite / g++.dg / cpp0x / nullptr11.C
blob85402a1a2a379252ce4f0ae5717a39536effc147
1 // { dg-do compile }
2 // { dg-options "-std=c++0x" }
4 // Test relational operators
6 #define assert_true(b) do { char c[2 * bool(b) - 1]; } while(0)
7 #define assert_false(b) do { char c[1 - 2 * bool(b)]; } while(0)
9 void fun()
11   assert_true(nullptr == nullptr);
12   assert_false(nullptr != nullptr);
13   assert_false(nullptr < nullptr);
14   assert_false(nullptr > nullptr);
15   assert_true(nullptr <= nullptr);
16   assert_true(nullptr >= nullptr);