Remove BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS workarounds

This commit is contained in:
Peter Dimov
2024-01-17 03:57:53 +02:00
parent b877f65f80
commit 81a9952695
2 changed files with 0 additions and 38 deletions

View File

@@ -335,30 +335,11 @@ public:
}
}
#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
BOOST_SYSTEM_CONSTEXPR explicit operator bool() const BOOST_NOEXCEPT // true if error
{
return failed();
}
#else
typedef void (*unspecified_bool_type)();
static void unspecified_bool_true() {}
BOOST_SYSTEM_CONSTEXPR operator unspecified_bool_type() const BOOST_NOEXCEPT // true if error
{
return failed()? unspecified_bool_true: 0;
}
BOOST_SYSTEM_CONSTEXPR bool operator!() const BOOST_NOEXCEPT // true if no error
{
return !failed();
}
#endif
bool has_location() const BOOST_NOEXCEPT
{
return lc_flags_ >= 4;

View File

@@ -158,30 +158,11 @@ public:
}
}
#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
BOOST_SYSTEM_CONSTEXPR explicit operator bool() const BOOST_NOEXCEPT // true if error
{
return failed();
}
#else
typedef void (*unspecified_bool_type)();
static void unspecified_bool_true() {}
BOOST_SYSTEM_CONSTEXPR operator unspecified_bool_type() const BOOST_NOEXCEPT // true if error
{
return failed()? unspecified_bool_true: 0;
}
BOOST_SYSTEM_CONSTEXPR bool operator!() const BOOST_NOEXCEPT // true if no error
{
return !failed();
}
#endif
// relationals:
// the more symmetrical non-member syntax allows enum
// conversions work for both rhs and lhs.