aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/DRs/dr1423.C
blob: d82baae9985e61a7e87848f16f1144f03bb00e75 (plain)
1
2
3
4
5
6
7
// DR 1423 - Convertibility of nullptr to bool.
// { dg-do compile { target c++11 } }

bool b = nullptr; // { dg-error "converting to .bool. from .std::nullptr_t. requires direct-initialization" }
bool b2(nullptr);
bool b3{nullptr};
bool b4 = { nullptr }; // { dg-error "converting to .bool. from .std::nullptr_t. requires direct-initialization" }