C++ Templated common return type for the Tilt Five™ API. More...
Go to the source code of this file.
Data Structures | |
class | tiltfive::BadResultAccess |
Throw when attempting to access a bad result. More... | |
class | tiltfive::Result< T > |
Templated return type with support for error conditions. More... | |
class | tiltfive::Result< void > |
Specialization of tiltfive::Result for functions with 'no return'. More... | |
struct | tiltfive::supports_ostream< T, Enable > |
struct | tiltfive::supports_ostream< T, decltype(std::declval< std::ostream & >()<< std::declval< T >())> |
Functions | |
template<typename T > | |
void | tiltfive::stringifyForStream (T &t, std::ostream &os, typename std::enable_if< supports_ostream< T >::value, T >::type *=0) |
template<typename T > | |
void | tiltfive::stringifyForStream (T &t, std::ostream &os, typename std::enable_if<!supports_ostream< T >::value, T >::type *=0) |
template<typename T > | |
std::ostream & | operator<< (std::ostream &os, const tiltfive::Result< T > &instance) |
Support for writing tiltfive::Result<> to an std::ostream. More... | |
template<> | |
std::ostream & | operator<< (std::ostream &os, const tiltfive::Result< void > &instance) |
Variables | |
static constexpr success_t | tiltfive::kSuccess {success_t::Construct::kToken} |
Indicates 'success' for a Result<void> function. More... | |
C++ Templated common return type for the Tilt Five™ API.
Definition in file result.hpp.
std::ostream & operator<< | ( | std::ostream & | os, |
const tiltfive::Result< T > & | instance | ||
) |
Support for writing tiltfive::Result<> to an std::ostream.
Definition at line 351 of file result.hpp.
|
inline |
Definition at line 362 of file result.hpp.
void tiltfive::stringifyForStream | ( | T & | t, |
std::ostream & | os, | ||
typename std::enable_if< supports_ostream< T >::value, T >::type * | = 0 |
||
) |
Definition at line 334 of file result.hpp.
void tiltfive::stringifyForStream | ( | T & | t, |
std::ostream & | os, | ||
typename std::enable_if<!supports_ostream< T >::value, T >::type * | = 0 |
||
) |
Definition at line 341 of file result.hpp.
|
staticconstexpr |
Indicates 'success' for a Result<void> function.
Definition at line 324 of file result.hpp.