////////////////////////////////////////////////////////////////////////////// /// \brief A semantic type used for distinguishing failure values in an /// API that returns result types /// /// \tparam E the error type //////////////////////////////////////////////////////////////////////////////
Class failure<E>
#include <Geode/external/result/result.hpp>
Examples0
Public static methods0
Public member functions15
template<typename...Args,typename = typename std::enable_if<std::is_constructible<E,Args...>::value>::type>voidfailure<type-parameter-0-0>(,Args &&...args)
/// \brief Constructs a failure by delegating construction to the /// underlying constructor /// /// \param args the arguments to forward to E’s constructor
template<typename U,typename...Args,typename = typename std::enable_if<std::is_constructible<E,std::initializer_list<U>,Args...>::value>::type>voidfailure<type-parameter-0-0>(,,Args &&...args)
/// \brief Constructs a failure by delegating construction to the /// underlying constructor /// /// \param ilist the initializer list /// \param args the arguments to forward to E’s constructor
template<typename E2>voidfailure<type-parameter-0-0>(E2&&error)
/// { /// \brief Constructs a failure from the given error /// /// \param error the error to create a failure from
template<typename E2,typename = typename std::enable_if<std::is_constructible<E,const E2&>::value>::type>voidfailure<type-parameter-0-0>()
/// \brief Constructs this failure by copy-converting \p other /// /// \param other the other failure to copy
template<typename E2,typename = typename std::enable_if<std::is_constructible<E,E2&&>::value>::type>voidfailure<type-parameter-0-0>()
/// \brief Constructs this failure by move-converting \p other /// /// \param other the other failure to copy
template<typename E2,typename = typename std::enable_if<detail::failure_is_value_assignable<E,E2>::value>::type>cpp::bitwizeshift::failure&operator=(E2&&error)
/// \brief Assigns the value of \p error to this failure through /// move-assignment /// /// \param error the value to assign /// \return reference to (*this)
cpp::bitwizeshift::failure&operator=()
/// \brief Assigns the contents of \p other to this by copy-assignment /// /// \param other the other failure to copy /// \return reference to (*this)
cpp::bitwizeshift::failure&operator=()
/// \brief Assigns the contents of \p other to this by move-assignment /// /// \param other the other failure to move /// \return reference to (*this)
template<typename E2,typename = typename std::enable_if<std::is_assignable<E&,const E2&>::value>::type>cpp::bitwizeshift::failure&operator=()
/// \brief Assigns the contents of \p other to this by copy conversion /// /// \param other the other failure to copy-convert /// \return reference to (*this)
template<typename E2,typename = typename std::enable_if<std::is_assignable<E&,E2&&>::value>::type>cpp::bitwizeshift::failure&operator=()
/// \brief Assigns the contents of \p other to this by move conversion /// /// \param other the other failure to move-convert /// \return reference to (*this)
typename std::add_lvalue_reference<E>::typeerror()
/// { /// \brief Gets the underlying error /// /// \return the underlying error