forked from boostorg/logic
Reenable constexpr test for operator bool
This commit is contained in:
committed by
James E. King III
parent
23cd89d4c8
commit
f890fcdf66
@ -125,13 +125,9 @@ int test_main(int, char*[])
|
||||
char array_ands[res_ands ? 2 : 3];
|
||||
BOOST_CHECK(sizeof(array_ands) / sizeof(char) == 3);
|
||||
|
||||
// We avoid checking the tribool::operator safe_bool(),
|
||||
// because GCC-4.8 fails to evaluate it at compile-time.
|
||||
// Clang compiles well.
|
||||
//
|
||||
// constexpr bool res_safe_bool = tribool(true); // false
|
||||
// constexpr tribool xxx = (tribool(true) || tribool(indeterminate));
|
||||
// static_assert(xxx, "Must be true!");
|
||||
constexpr bool res_safe_bool = static_cast<bool>( tribool(true) );
|
||||
constexpr tribool xxx = (tribool(true) || tribool(indeterminate));
|
||||
static_assert(xxx, "Must be true!");
|
||||
#endif
|
||||
|
||||
std::cout << "no errors detected\n";
|
||||
|
Reference in New Issue
Block a user