mirror of
https://github.com/boostorg/logic.git
synced 2025-07-30 04:07:15 +02:00
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];
|
char array_ands[res_ands ? 2 : 3];
|
||||||
BOOST_CHECK(sizeof(array_ands) / sizeof(char) == 3);
|
BOOST_CHECK(sizeof(array_ands) / sizeof(char) == 3);
|
||||||
|
|
||||||
// We avoid checking the tribool::operator safe_bool(),
|
constexpr bool res_safe_bool = static_cast<bool>( tribool(true) );
|
||||||
// because GCC-4.8 fails to evaluate it at compile-time.
|
constexpr tribool xxx = (tribool(true) || tribool(indeterminate));
|
||||||
// Clang compiles well.
|
static_assert(xxx, "Must be true!");
|
||||||
//
|
|
||||||
// constexpr bool res_safe_bool = tribool(true); // false
|
|
||||||
// constexpr tribool xxx = (tribool(true) || tribool(indeterminate));
|
|
||||||
// static_assert(xxx, "Must be true!");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::cout << "no errors detected\n";
|
std::cout << "no errors detected\n";
|
||||||
|
Reference in New Issue
Block a user