Skip to content

Commit

Permalink
Fix for C++14
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaa committed Jan 22, 2025
1 parent 1e8e6da commit aaea47c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/ConnectionPoolImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@

using namespace std;

#if __cplusplus < 201703L
# include <boost/unordered_map.hpp>
#endif


namespace restc_cpp {

class ConnectionPoolImpl
Expand Down Expand Up @@ -438,9 +443,13 @@ class ConnectionPoolImpl
#endif
std::once_flag close_once_;
RestClient& owner_;
unordered_multimap<Key, Entry::ptr_t, Key::KeyHash, Key::KeyEqual> idle_;
unordered_multimap<Key, std::weak_ptr<Entry>, Key::KeyHash, Key::KeyEqual> in_use_;
//std::queue<Entry> pending_;
#if __cplusplus < 201703L
boost::unordered_multimap<Key, Entry::ptr_t, Key::KeyHash, Key::KeyEqual> idle_;
boost::unordered_multimap<Key, std::weak_ptr<Entry>, Key::KeyHash, Key::KeyEqual> in_use_;
#else
std::unordered_multimap<Key, Entry::ptr_t, Key::KeyHash, Key::KeyEqual> idle_;
std::unordered_multimap<Key, std::weak_ptr<Entry>, Key::KeyHash, Key::KeyEqual> in_use_;
#endif
const Request::Properties::ptr_t properties_;
ConnectionWrapper::release_callback_t on_release_;
boost::asio::deadline_timer cache_cleanup_timer_;
Expand Down

0 comments on commit aaea47c

Please sign in to comment.