...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::log::visitation_result — The class represents attribute value visitation result.
// In header: <boost/log/attributes/value_visitation.hpp> class visitation_result { public: // Error codes for attribute value visitation. enum error_code { ok, value_not_found, value_has_invalid_type }; // public member functions visitation_result(error_code = ok) noexcept; explicit operator bool() const noexcept; bool operator!() const noexcept; error_code code() const noexcept; };
The main purpose of this class is to provide a convenient interface for checking whether the attribute value visitation succeeded or not. It also allows to discover the actual cause of failure, should the operation fail.
visitation_result
public member functionsvisitation_result(error_code code = ok) noexcept;
Initializing constructor. Creates the result that is equivalent to the specified error code.
explicit operator bool() const noexcept;
Checks if the visitation was successful.
Returns: |
|
bool operator!() const noexcept;
Checks if the visitation was unsuccessful.
Returns: |
|
error_code code() const noexcept;
Returns: |
The actual result code of value visitation |