diff --git a/src/ripple/common/KeyCache.h b/src/ripple/common/KeyCache.h index 030be2029..592078d76 100644 --- a/src/ripple/common/KeyCache.h +++ b/src/ripple/common/KeyCache.h @@ -183,8 +183,8 @@ public: lock_guard lock (m_mutex); clock_type::time_point const now (m_clock.now ()); std::pair result (m_map.emplace ( - std::piecewise_construct, std::make_tuple (key), - std::make_tuple (now))); + std::piecewise_construct, std::forward_as_tuple (key), + std::forward_as_tuple (now))); if (! result.second) { result.first->second.last_access = now; diff --git a/src/ripple/peerfinder/impl/Bootcache.h b/src/ripple/peerfinder/impl/Bootcache.h index a2bf4ad95..f7a97dc5d 100644 --- a/src/ripple/peerfinder/impl/Bootcache.h +++ b/src/ripple/peerfinder/impl/Bootcache.h @@ -172,7 +172,7 @@ public: //-------------------------------------------------------------------------- - typedef boost::unordered_map Entries; + typedef std::unordered_map Entries; typedef std::vector SortedEntries; @@ -217,8 +217,9 @@ public: iter != list.end(); ++iter) { std::pair result ( - m_entries.emplace (boost::unordered::piecewise_construct, - boost::make_tuple (iter->address), boost::make_tuple ())); + m_entries.emplace (std::piecewise_construct, + std::forward_as_tuple (iter->address), + std::make_tuple ())); if (result.second) { ++count; @@ -286,8 +287,9 @@ public: bool insert (IP::Endpoint const& address) { std::pair result ( - m_entries.emplace (boost::unordered::piecewise_construct, - boost::make_tuple (address), boost::make_tuple ())); + m_entries.emplace (std::piecewise_construct, + std::forward_as_tuple (address), + std::make_tuple ())); if (result.second) { if (m_journal.trace) m_journal.trace << leftw (18) << @@ -331,8 +333,9 @@ public: HandshakeAction action) { std::pair result ( - m_entries.emplace (boost::unordered::piecewise_construct, - boost::make_tuple (address), boost::make_tuple ())); + m_entries.emplace (std::piecewise_construct, + std::forward_as_tuple (address), + std::make_tuple ())); Entry& entry (result.first->second); // Can't already be active! consistency_check (! entry.active); @@ -371,8 +374,9 @@ public: void onConnectionActive (IP::Endpoint const& address) { std::pair result ( - m_entries.emplace (boost::unordered::piecewise_construct, - boost::make_tuple (address), boost::make_tuple ())); + m_entries.emplace (std::piecewise_construct, + std::forward_as_tuple (address), + std::make_tuple ())); // Must exist! consistency_check (! result.second); Entry& entry (result.first->second); diff --git a/src/ripple/peerfinder/impl/Logic.h b/src/ripple/peerfinder/impl/Logic.h index fc0d35b7a..8294fc597 100644 --- a/src/ripple/peerfinder/impl/Logic.h +++ b/src/ripple/peerfinder/impl/Logic.h @@ -180,7 +180,7 @@ public: for (auto remote_address : addresses) { auto result (state->fixed.emplace (std::piecewise_construct, - std::make_tuple (remote_address), + std::forward_as_tuple (remote_address), std::make_tuple (std::ref (m_clock)))); if (result.second) diff --git a/src/ripple_app/misc/NetworkOPs.cpp b/src/ripple_app/misc/NetworkOPs.cpp index 57cf9fb3a..0b5561a4f 100644 --- a/src/ripple_app/misc/NetworkOPs.cpp +++ b/src/ripple_app/misc/NetworkOPs.cpp @@ -1828,7 +1828,11 @@ std::vector NetworkOPsImp::getAccountTxsB ( else rawMeta.resize (metaSize); - ret.push_back (boost::make_tuple (strHex (rawTxn), strHex (rawMeta), db->getInt ("LedgerSeq"))); + // VFALCO TODO Change the container's type to be std::tuple so + // we can use std::forward_as_tuple here + // + ret.push_back (boost::make_tuple ( + strHex (rawTxn), strHex (rawMeta), db->getInt ("LedgerSeq"))); } } @@ -2039,7 +2043,8 @@ NetworkOPsImp::getTxsAccountB (const RippleAddress& account, int32 minLedger, in else rawMeta.resize (metaSize); - ret.push_back (boost::make_tuple (strHex (rawTxn), strHex (rawMeta), db->getInt ("LedgerSeq"))); + ret.push_back (boost::make_tuple ( + strHex (rawTxn), strHex (rawMeta), db->getInt ("LedgerSeq"))); --numberOfResults; } } diff --git a/src/ripple_rpc/impl/ErrorCodes.cpp b/src/ripple_rpc/impl/ErrorCodes.cpp index 33c1118a0..0b3dc6b52 100644 --- a/src/ripple_rpc/impl/ErrorCodes.cpp +++ b/src/ripple_rpc/impl/ErrorCodes.cpp @@ -126,7 +126,7 @@ private: { std::pair result ( m_map.emplace (std::piecewise_construct, - std::make_tuple (code), std::make_tuple ( + std::forward_as_tuple (code), std::forward_as_tuple ( code, token, message))); if (! result.second) throw std::invalid_argument ("duplicate error code"); diff --git a/src/ripple_rpc/impl/Manager.cpp b/src/ripple_rpc/impl/Manager.cpp index be2ff9bb0..22a55dca7 100644 --- a/src/ripple_rpc/impl/Manager.cpp +++ b/src/ripple_rpc/impl/Manager.cpp @@ -42,8 +42,8 @@ public: void add (std::string const& method, handler_type&& handler) { std::pair result (m_map.emplace ( - std::piecewise_construct, std::make_tuple (method), - std::make_tuple (std::move (handler)))); + std::piecewise_construct, std::forward_as_tuple (method), + std::forward_as_tuple (std::move (handler)))); } bool dispatch (Request& req)