Add includes for boost in_place

This commit is contained in:
seelabs
2015-08-13 14:48:01 -04:00
committed by Nik Bougalis
parent e8643dd8cc
commit c729ceab20
10 changed files with 13 additions and 7 deletions

View File

@@ -23,7 +23,7 @@
BasicApp::BasicApp(std::size_t numberOfThreads) BasicApp::BasicApp(std::size_t numberOfThreads)
{ {
work_ = boost::in_place(std::ref(io_service_)); work_.emplace (io_service_);
threads_.reserve(numberOfThreads); threads_.reserve(numberOfThreads);
while(numberOfThreads--) while(numberOfThreads--)
threads_.emplace_back( threads_.emplace_back(

View File

@@ -81,7 +81,7 @@ boost::optional<HTTPClientSSLContext> httpClientSSLContext;
void HTTPClient::initializeSSLContext () void HTTPClient::initializeSSLContext ()
{ {
httpClientSSLContext = boost::in_place(); httpClientSSLContext.emplace ();
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View File

@@ -36,6 +36,8 @@
#include <beast/utility/ci_char_traits.h> #include <beast/utility/ci_char_traits.h>
#include <beast/utility/WrappedSink.h> #include <beast/utility/WrappedSink.h>
#include <boost/utility/in_place_factory.hpp>
namespace ripple { namespace ripple {
/** A functor to visit all active peers and retrieve their JSON data */ /** A functor to visit all active peers and retrieve their JSON data */

View File

@@ -24,6 +24,7 @@
#include <boost/asio.hpp> #include <boost/asio.hpp>
#include <boost/asio/ssl.hpp> #include <boost/asio/ssl.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/utility/in_place_factory.hpp>
#include <beast/threads/Thread.h> #include <beast/threads/Thread.h>
#include <cassert> #include <cassert>
#include <condition_variable> #include <condition_variable>

View File

@@ -26,6 +26,7 @@
#include <ripple/core/SociDB.h> #include <ripple/core/SociDB.h>
#include <boost/asio/io_service.hpp> #include <boost/asio/io_service.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/utility/in_place_factory.hpp>
#include <beast/cxx14/memory.h> // <memory> #include <beast/cxx14/memory.h> // <memory>
#include <thread> #include <thread>

View File

@@ -188,10 +188,10 @@ public:
, m_sink (prefix(), journal.sink()) , m_sink (prefix(), journal.sink())
, m_journal (Journal (m_sink, journal.severity()), Reporting::node) , m_journal (Journal (m_sink, journal.severity()), Reporting::node)
, m_next_port (m_config.listening_endpoint.port() + 1) , m_next_port (m_config.listening_endpoint.port() + 1)
, m_logic (boost::in_place (
std::ref (clock), std::ref (*this), std::ref (*this), std::ref (*this), m_journal))
, m_when_expire (m_network.now() + std::chrono::seconds (1)) , m_when_expire (m_network.now() + std::chrono::seconds (1))
{ {
m_logic.emplace (
clock, *this, *this, *this, m_journal);
logic().setConfig (m_config.config); logic().setConfig (m_config.config);
logic().load (); logic().load ();
} }

View File

@@ -145,7 +145,7 @@ struct STExchange<STBlob, PublicKey>
get (boost::optional<value_type>& t, get (boost::optional<value_type>& t,
STBlob const& u) STBlob const& u)
{ {
t = boost::in_place(Slice(u.data(), u.size())); t.emplace (Slice(u.data(), u.size()));
} }
static static

View File

@@ -72,7 +72,7 @@ struct STExchange<STBlob, Slice>
get (boost::optional<value_type>& t, get (boost::optional<value_type>& t,
STBlob const& u) STBlob const& u)
{ {
t = boost::in_place(u.data(), u.size()); t.emplace (u.data(), u.size());
} }
static static
@@ -95,7 +95,7 @@ struct STExchange<STBlob, Buffer>
get (boost::optional<Buffer>& t, get (boost::optional<Buffer>& t,
STBlob const& u) STBlob const& u)
{ {
t = boost::in_place( t.emplace (
u.data(), u.size()); u.data(), u.size());
} }

View File

@@ -22,6 +22,7 @@
#include <ripple/server/impl/Peer.h> #include <ripple/server/impl/Peer.h>
#include <beast/chrono/chrono_io.h> #include <beast/chrono/chrono_io.h>
#include <boost/chrono/chrono_io.hpp> #include <boost/chrono/chrono_io.hpp>
#include <boost/utility/in_place_factory.hpp>
#include <cassert> #include <cassert>
#include <ctime> #include <ctime>
#include <iomanip> #include <iomanip>

View File

@@ -24,6 +24,7 @@
#include <beast/unit_test/suite.h> #include <beast/unit_test/suite.h>
#include <boost/asio/ip/tcp.hpp> #include <boost/asio/ip/tcp.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/utility/in_place_factory.hpp>
#include <chrono> #include <chrono>
#include <stdexcept> #include <stdexcept>
#include <thread> #include <thread>