model+utils: Replace boost::tuple with std::tuple in trie implementation
diff --git a/utils/trie/payload-with-policy.hpp b/utils/trie/payload-with-policy.hpp
index 4010511..5d2fe47 100644
--- a/utils/trie/payload-with-policy.hpp
+++ b/utils/trie/payload-with-policy.hpp
@@ -57,7 +57,7 @@
// {
// iterator foundItem, lastItem;
// bool reachLast;
- // boost::tie (foundItem, reachLast, lastItem) = trie_.find (key);
+ // std::tie (foundItem, reachLast, lastItem) = trie_.find (key);
// if (!reachLast || lastItem->payload () == PayloadTraits::empty_payload)
// return; // nothing to invalidate
diff --git a/utils/trie/trie-with-policy.hpp b/utils/trie/trie-with-policy.hpp
index 790dd0f..d6b00b3 100644
--- a/utils/trie/trie-with-policy.hpp
+++ b/utils/trie/trie-with-policy.hpp
@@ -71,7 +71,7 @@
{
iterator foundItem, lastItem;
bool reachLast;
- boost::tie(foundItem, reachLast, lastItem) = trie_.find(key);
+ std::tie(foundItem, reachLast, lastItem) = trie_.find(key);
if (!reachLast || lastItem->payload() == PayloadTraits::empty_payload)
return; // nothing to invalidate
@@ -118,7 +118,7 @@
{
iterator foundItem, lastItem;
bool reachLast;
- boost::tie(foundItem, reachLast, lastItem) = trie_.find(key);
+ std::tie(foundItem, reachLast, lastItem) = trie_.find(key);
if (!reachLast || lastItem->payload() == PayloadTraits::empty_payload)
return end();
@@ -134,7 +134,7 @@
{
iterator foundItem, lastItem;
bool reachLast;
- boost::tie(foundItem, reachLast, lastItem) = trie_.find(key);
+ std::tie(foundItem, reachLast, lastItem) = trie_.find(key);
if (foundItem != trie_.end()) {
policy_.lookup(s_iterator_to(foundItem));
}
@@ -150,7 +150,7 @@
{
iterator foundItem, lastItem;
bool reachLast;
- boost::tie(foundItem, reachLast, lastItem) = trie_.find_if(key, pred);
+ std::tie(foundItem, reachLast, lastItem) = trie_.find_if(key, pred);
if (foundItem != trie_.end()) {
policy_.lookup(s_iterator_to(foundItem));
}
@@ -175,7 +175,7 @@
{
iterator foundItem, lastItem;
bool reachLast;
- boost::tie(foundItem, reachLast, lastItem) = trie_.find(key);
+ std::tie(foundItem, reachLast, lastItem) = trie_.find(key);
// guard in case we don't have anything in the trie
if (lastItem == trie_.end())
@@ -202,7 +202,7 @@
{
iterator foundItem, lastItem;
bool reachLast;
- boost::tie(foundItem, reachLast, lastItem) = trie_.find(key);
+ std::tie(foundItem, reachLast, lastItem) = trie_.find(key);
// guard in case we don't have anything in the trie
if (lastItem == trie_.end())
@@ -233,7 +233,7 @@
{
iterator foundItem, lastItem;
bool reachLast;
- boost::tie(foundItem, reachLast, lastItem) = trie_.find(key);
+ std::tie(foundItem, reachLast, lastItem) = trie_.find(key);
// guard in case we don't have anything in the trie
if (lastItem == trie_.end())
diff --git a/utils/trie/trie.hpp b/utils/trie/trie.hpp
index 04ed980..dd10e6d 100644
--- a/utils/trie/trie.hpp
+++ b/utils/trie/trie.hpp
@@ -30,7 +30,7 @@
#include <boost/intrusive/set.hpp>
#include <boost/functional/hash.hpp>
#include <boost/interprocess/smart_ptr/unique_ptr.hpp>
-#include <boost/tuple/tuple.hpp>
+#include <tuple>
#include <boost/foreach.hpp>
#include <boost/mpl/if.hpp>
@@ -274,7 +274,7 @@
}
}
- // inline boost::tuple<const iterator, bool, const iterator>
+ // inline std::tuple<const iterator, bool, const iterator>
// find (const FullKey &key) const
// {
// return const_cast<trie*> (this)->find (key);
@@ -286,7 +286,7 @@
*
* @return ->second is true if prefix in ->first is longer than key
*/
- inline boost::tuple<iterator, bool, iterator>
+ inline std::tuple<iterator, bool, iterator>
find(const FullKey& key)
{
trie* trieNode = this;
@@ -307,7 +307,7 @@
}
}
- return boost::make_tuple(foundNode, reachLast, trieNode);
+ return std::make_tuple(foundNode, reachLast, trieNode);
}
/**
@@ -317,7 +317,7 @@
* @return ->second is true if prefix in ->first is longer than key
*/
template<class Predicate>
- inline boost::tuple<iterator, bool, iterator>
+ inline std::tuple<iterator, bool, iterator>
find_if(const FullKey& key, Predicate pred)
{
trie* trieNode = this;
@@ -339,7 +339,7 @@
}
}
- return boost::make_tuple(foundNode, reachLast, trieNode);
+ return std::make_tuple(foundNode, reachLast, trieNode);
}
/**