ゴミ箱
Functions
utils Namespace Reference

Functions

template<typename Target , typename Source >
std::optional< Target > convert (const Source &arg)
 
void log_error (const boost::system::error_code &error)
 
void log_error (const boost::system::error_code &error, const char *prefix)
 

Detailed Description

Misc. utilities module.

Function Documentation

template<typename Target , typename Source >
std::optional<Target> utils::convert ( const Source &  arg)
inline

Converts between types using boost::lexical_cast

Parameters
[in]argSource value
Returns
Converted value.
Return values
std::nulloptOn failure
void utils::log_error ( const boost::system::error_code &  error)

Logs Boost error code.

Parameters
[in]errorBoost Error Code
void utils::log_error ( const boost::system::error_code &  error,
const char *  prefix 
)

Logs Boost error code.

Parameters
[in]errorBoost Error Code
[in]prefixPrefix of error message.