| Tilt Five NDK |

Data Structures | Functions | Variables
result.hpp File Reference

C++ Templated common return type for the Tilt Five™ API. More...

`#include <iostream>`
`#include <string>`
Include dependency graph for result.hpp:
This graph shows which files directly or indirectly include this file:

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...

## Detailed Description

C++ Templated common return type for the Tilt Five™ API.

Definition in file result.hpp.

## Function Documentation

## ◆ operator<<() [1/2]

template<typename T >

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.

## ◆ operator<<() [2/2]

template<>

std::ostream & operator<< | ( | std::ostream & | os,
|  | const tiltfive::Result< void > & | instance
| ) |  |
| inline

Definition at line 362 of file result.hpp.

## ◆ stringifyForStream() [1/2]

template<typename T >

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.

## ◆ stringifyForStream() [2/2]

template<typename T >

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.

## Variable Documentation

## ◆ kSuccess

constexpr success_t tiltfive::kSuccess {success_t::Construct::kToken}
| static constexpr

Indicates 'success' for a Result<void> function.

Definition at line 324 of file result.hpp.