Helper class for implementing a solution to the "explicit bool conversion" problem. More...
#include <zorba/internal/ztd.h>
Public Types | |
typedef int pointer_conversion::* | type |
Static Public Member Functions | |
static type | false_value () |
Gets the explicit bool value for false . More... | |
static type | true_value () |
Gets the explicit bool value for true . More... | |
template<typename T > | |
static std::enable_if < ZORBA_TR1_NS::is_convertible < T, bool >::value, type > ::type | value_of (T const &value) |
Converts the given value to an explicit bool value. More... | |
Helper class for implementing a solution to the "explicit bool conversion" problem.
The canonical use is of the form:
See: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2333.html
typedef int pointer_conversion::* zorba::internal::ztd::explicit_bool::type |
|
inlinestatic |
Gets the explicit bool
value for false
.
Definition at line 399 of file ztd.h.
Referenced by value_of().
|
inlinestatic |
Gets the explicit bool
value for true
.
Definition at line 408 of file ztd.h.
Referenced by value_of().
|
inlinestatic |
Converts the given value to an explicit bool
value.
T | The type of the value to convert. |
value | The value to convert. |
Definition at line 422 of file ztd.h.
References false_value(), and true_value().
Referenced by std::unique_ptr< zorba::Sequence::iterator >::operator explicit_bool::type().