mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 19:45:53 +00:00
Put boost placeholders in a namespace (hack)
This commit is contained in:
@@ -54,16 +54,6 @@ namespace beast
|
||||
#include "threads/beast_InterruptibleThread.cpp"
|
||||
#include "threads/beast_Semaphore.cpp"
|
||||
|
||||
#if BEAST_WINDOWS
|
||||
#include "native/beast_win32_FPUFlags.cpp"
|
||||
#include "native/beast_win32_Threads.cpp"
|
||||
|
||||
#else
|
||||
#include "native/beast_posix_FPUFlags.cpp"
|
||||
#include "native/beast_posix_Threads.cpp"
|
||||
|
||||
#endif
|
||||
|
||||
#if BEAST_USE_BOOST
|
||||
#include "memory/beast_FifoFreeStoreWithTLS.cpp"
|
||||
#else
|
||||
@@ -82,8 +72,35 @@ namespace beast
|
||||
#include "threads/beast_ThreadGroup.cpp"
|
||||
#include "threads/beast_ThreadWithCallQueue.cpp"
|
||||
|
||||
#if BEAST_WINDOWS
|
||||
#include "native/beast_win32_FPUFlags.cpp"
|
||||
#include "native/beast_win32_Threads.cpp"
|
||||
|
||||
#else
|
||||
#include "native/beast_posix_FPUFlags.cpp"
|
||||
#include "native/beast_posix_Threads.cpp"
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#if BEAST_MSVC
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if BEAST_USE_BOOST
|
||||
namespace boost {
|
||||
namespace placeholders {
|
||||
boost::arg<1> _1;
|
||||
boost::arg<2> _2;
|
||||
boost::arg<3> _3;
|
||||
boost::arg<4> _4;
|
||||
boost::arg<5> _5;
|
||||
boost::arg<6> _6;
|
||||
boost::arg<7> _7;
|
||||
boost::arg<8> _8;
|
||||
boost::arg<9> _9;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -222,12 +222,12 @@
|
||||
|
||||
@todo Discuss the treatment of exceptions versus Error objects in the library.
|
||||
|
||||
@todo Discuss the additions to AppConfig.h
|
||||
@todo Discuss the additions to BeastConfig.h
|
||||
|
||||
@defgroup beast_core beast_core
|
||||
*/
|
||||
|
||||
/* See the Juce notes regarding AppConfig.h
|
||||
/* See the JUCE notes regarding BeastConfig.h
|
||||
|
||||
This file must always be included before any Juce headers.
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
/* BeastConfig.h must be included before this file */
|
||||
|
||||
/* Use sensible default configurations if they forgot
|
||||
to append the necessary macros into their AppConfig.h.
|
||||
to append the necessary macros into their BeastConfig.h.
|
||||
*/
|
||||
#ifndef BEAST_USE_BOOST
|
||||
#define BEAST_USE_BOOST 0
|
||||
@@ -286,6 +286,34 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// This is a hack to fix boost's goofy placeholders
|
||||
#if BEAST_USE_BOOST
|
||||
#ifdef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
||||
#error <boost/bind.hpp> must not be included before this file
|
||||
#endif
|
||||
// Prevent <boost/bind/placeholders.hpp> from being included
|
||||
#define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
||||
#include <boost/bind/arg.hpp>
|
||||
#include <boost/config.hpp>
|
||||
// This based on <boost/bind/placeholders.cpp>
|
||||
namespace boost {
|
||||
namespace placeholders {
|
||||
extern boost::arg<1> _1;
|
||||
extern boost::arg<2> _2;
|
||||
extern boost::arg<3> _3;
|
||||
extern boost::arg<4> _4;
|
||||
extern boost::arg<5> _5;
|
||||
extern boost::arg<6> _6;
|
||||
extern boost::arg<7> _7;
|
||||
extern boost::arg<8> _8;
|
||||
extern boost::arg<9> _9;
|
||||
}
|
||||
using namespace placeholders;
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Choose a source of bind, placeholders, and function
|
||||
|
||||
#if !BEAST_BIND_USES_STD && !BEAST_BIND_USES_TR1 && !BEAST_BIND_USES_BOOST
|
||||
|
||||
@@ -241,83 +241,83 @@ using boost::bind;
|
||||
using boost::function;
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 1
|
||||
using ::_1;
|
||||
using boost::placeholders::_1;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 2
|
||||
using ::_2;
|
||||
using boost::placeholders::_2;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 3
|
||||
using ::_3;
|
||||
using boost::placeholders::_3;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 4
|
||||
using ::_4;
|
||||
using boost::placeholders::_4;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 5
|
||||
using ::_5;
|
||||
using boost::placeholders::_5;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 6
|
||||
using ::_6;
|
||||
using boost::placeholders::_6;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 7
|
||||
using ::_7;
|
||||
using boost::placeholders::_7;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 8
|
||||
using ::_8;
|
||||
using boost::placeholders::_8;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 9
|
||||
using ::_9;
|
||||
using boost::placeholders::_9;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 10
|
||||
using ::_10;
|
||||
using boost::placeholders::_10;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 11
|
||||
using ::_11;
|
||||
using boost::placeholders::_11;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 12
|
||||
using ::_12;
|
||||
using boost::placeholders::_12;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 13
|
||||
using ::_13;
|
||||
using boost::placeholders::_13;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 14
|
||||
using ::_14;
|
||||
using boost::placeholders::_14;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 15
|
||||
using ::_15;
|
||||
using boost::placeholders::_15;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 16
|
||||
using ::_16;
|
||||
using boost::placeholders::_16;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 17
|
||||
using ::_17;
|
||||
using boost::placeholders::_17;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 18
|
||||
using ::_18;
|
||||
using boost::placeholders::_18;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 19
|
||||
using ::_19;
|
||||
using boost::placeholders::_19;
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_PLACEHOLDERS_N >= 20
|
||||
using ::_20;
|
||||
using boost::placeholders::_20;
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user