Skip to content

Commit aaea47c

Browse files
committed
Fix for C++14
1 parent 1e8e6da commit aaea47c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/ConnectionPoolImpl.cpp

+12-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323

2424
using namespace std;
2525

26+
#if __cplusplus < 201703L
27+
# include <boost/unordered_map.hpp>
28+
#endif
29+
30+
2631
namespace restc_cpp {
2732

2833
class ConnectionPoolImpl
@@ -438,9 +443,13 @@ class ConnectionPoolImpl
438443
#endif
439444
std::once_flag close_once_;
440445
RestClient& owner_;
441-
unordered_multimap<Key, Entry::ptr_t, Key::KeyHash, Key::KeyEqual> idle_;
442-
unordered_multimap<Key, std::weak_ptr<Entry>, Key::KeyHash, Key::KeyEqual> in_use_;
443-
//std::queue<Entry> pending_;
446+
#if __cplusplus < 201703L
447+
boost::unordered_multimap<Key, Entry::ptr_t, Key::KeyHash, Key::KeyEqual> idle_;
448+
boost::unordered_multimap<Key, std::weak_ptr<Entry>, Key::KeyHash, Key::KeyEqual> in_use_;
449+
#else
450+
std::unordered_multimap<Key, Entry::ptr_t, Key::KeyHash, Key::KeyEqual> idle_;
451+
std::unordered_multimap<Key, std::weak_ptr<Entry>, Key::KeyHash, Key::KeyEqual> in_use_;
452+
#endif
444453
const Request::Properties::ptr_t properties_;
445454
ConnectionWrapper::release_callback_t on_release_;
446455
boost::asio::deadline_timer cache_cleanup_timer_;

0 commit comments

Comments
 (0)