mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-23 04:25:51 +00:00
Except when interacting with boost, use std::function and std::bind
when C++11 is available. See: http://stackoverflow.com/questions/14617835
This commit is contained in:
@@ -289,13 +289,28 @@ bool parseUrl(const std::string& strUrl, std::string& strScheme, std::string& st
|
||||
#if (!defined(FORCE_NO_C11X) && (__cplusplus > 201100L)) || defined(FORCE_C11X)
|
||||
|
||||
#define C11X
|
||||
#define UPTR_T std::unique_ptr
|
||||
#define MOVE_P(p) std::move(p)
|
||||
#include <functional>
|
||||
#define UPTR_T std::unique_ptr
|
||||
#define MOVE_P(p) std::move(p)
|
||||
#define BIND_TYPE std::bind
|
||||
#define FUNCTION_TYPE std::function
|
||||
#define P_1 std::placeholders::_1
|
||||
#define P_2 std::placeholders::_2
|
||||
#define P_3 std::placeholders::_3
|
||||
#define P_4 std::placeholders::_4
|
||||
|
||||
#else
|
||||
|
||||
#define UPTR_T std::auto_ptr
|
||||
#define MOVE_P(p) (p)
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#define UPTR_T std::auto_ptr
|
||||
#define MOVE_P(p) (p)
|
||||
#define BIND_TYPE boost::bind
|
||||
#define FUNCTION_TYPE boost::function
|
||||
#define P_1 _1
|
||||
#define P_2 _2
|
||||
#define P_3 _3
|
||||
#define P_4 _4
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user