Electroneum
Loading...
Searching...
No Matches
misc_language.h File Reference
#include <limits>
#include <boost/thread.hpp>
#include <boost/utility/value_init.hpp>
Include dependency graph for misc_language.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  epee::misc_utils::less_as_pod< _Ty >
struct  epee::misc_utils::call_befor_die_base
struct  epee::misc_utils::call_befor_die< t_scope_leave_handler >
struct  epee::misc_utils::struct_init< T >

Namespaces

namespace  epee
namespace  epee::misc_utils

Macros

#define STD_TRY_BEGIN()
#define STD_TRY_CATCH(where_, ret_val)
#define AUTO_VAL_INIT(v)

Typedefs

typedef boost::shared_ptr< call_befor_die_baseepee::misc_utils::auto_scope_leave_caller

Functions

template<typename t_type>
t_type epee::misc_utils::get_max_t_val (t_type t)
template<typename t_iterator>
t_iterator epee::misc_utils::move_it_forward (t_iterator it, size_t count)
template<typename t_iterator>
t_iterator epee::misc_utils::move_it_backward (t_iterator it, size_t count)
template<class _Ty>
bool epee::misc_utils::is_less_as_pod (const _Ty &_Left, const _Ty &_Right)
bool epee::misc_utils::sleep_no_w (long ms)
template<class type_vec_type>
type_vec_type epee::misc_utils::median (std::vector< type_vec_type > &v)
template<class t_scope_leave_handler>
auto_scope_leave_caller epee::misc_utils::create_scope_leave_handler (t_scope_leave_handler f)

Macro Definition Documentation

◆ AUTO_VAL_INIT

#define AUTO_VAL_INIT ( v)
Value:
boost::value_initialized<decltype(v)>()

Definition at line 53 of file misc_language.h.

◆ STD_TRY_BEGIN

#define STD_TRY_BEGIN ( )
Value:
try {

Definition at line 36 of file misc_language.h.

◆ STD_TRY_CATCH

#define STD_TRY_CATCH ( where_,
ret_val )
Value:
} \
catch (const std::exception &e) \
{ \
LOG_ERROR("EXCEPTION: " << where_ << ", mes: "<< e.what()); \
return ret_val; \
} \
catch (...) \
{ \
LOG_ERROR("EXCEPTION: " << where_ ); \
return ret_val; \
}

Definition at line 38 of file misc_language.h.

38#define STD_TRY_CATCH(where_, ret_val) \
39 } \
40 catch (const std::exception &e) \
41 { \
42 LOG_ERROR("EXCEPTION: " << where_ << ", mes: "<< e.what()); \
43 return ret_val; \
44 } \
45 catch (...) \
46 { \
47 LOG_ERROR("EXCEPTION: " << where_ ); \
48 return ret_val; \
49 }