aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/misc_language.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/epee/include/misc_language.h')
-rw-r--r--contrib/epee/include/misc_language.h52
1 files changed, 0 insertions, 52 deletions
diff --git a/contrib/epee/include/misc_language.h b/contrib/epee/include/misc_language.h
index 5ccfe6fcc..bf75da23f 100644
--- a/contrib/epee/include/misc_language.h
+++ b/contrib/epee/include/misc_language.h
@@ -30,47 +30,13 @@
#include <boost/utility/value_init.hpp>
#include <boost/shared_ptr.hpp>
-#include <limits>
-#include <functional>
#include <vector>
namespace epee
{
-#define STD_TRY_BEGIN() try {
-
-#define STD_TRY_CATCH(where_, ret_val) \
- } \
- catch (const std::exception &e) \
- { \
- LOG_ERROR("EXCEPTION: " << where_ << ", mes: "<< e.what()); \
- return ret_val; \
- } \
- catch (...) \
- { \
- LOG_ERROR("EXCEPTION: " << where_ ); \
- return ret_val; \
- }
-
-
-
#define AUTO_VAL_INIT(v) boost::value_initialized<decltype(v)>()
namespace misc_utils
{
- template<typename t_type>
- t_type get_max_t_val(t_type t)
- {
- return (std::numeric_limits<t_type>::max)();
- }
-
-
- template<typename t_iterator>
- t_iterator move_it_forward(t_iterator it, size_t count)
- {
- while(count--)
- it++;
- return it;
- }
-
template<typename t_iterator>
t_iterator move_it_backward(t_iterator it, size_t count)
{
@@ -79,24 +45,6 @@ namespace misc_utils
return it;
}
-
- // TEMPLATE STRUCT less
- template<class _Ty>
- struct less_as_pod
- : public std::binary_function<_Ty, _Ty, bool>
- { // functor for operator<
- bool operator()(const _Ty& _Left, const _Ty& _Right) const
- { // apply operator< to operands
- return memcmp(&_Left, &_Right, sizeof(_Left)) < 0;
- }
- };
-
- template<class _Ty>
- bool is_less_as_pod(const _Ty& _Left, const _Ty& _Right)
- { // apply operator< to operands
- return memcmp(&_Left, &_Right, sizeof(_Left)) < 0;
- }
-
bool sleep_no_w(long ms );
template <typename T>