Simple client code not compiling with gcc-12
ns-wxin opened this issue · 2 comments
ns-wxin commented
My gcc-12 compiler spilled out some compile error on a simple oatpp client. I'm using oatpp code tagged at 1.3.0. Any help would be appreciated.
My .hpp has the following:
class FingerprintApiClient : public oatpp::web::client::ApiClient {
#include OATPP_CODEGEN_BEGIN(ApiClient)
API_CLIENT_INIT(FingerprintApiClient)
API_CALL("GET", "get", doGet)
API_CALL("POST", "post", doPost, BODY_STRING(String, body))
API_CALL("PUT", "put", doPut, BODY_STRING(String, body))
#include OATPP_CODEGEN_END(ApiClient)
};
/**
* @brief this class is responsible for make HTTP calls to Lookup service
*
*/
class FingerprintLookupClient {
private:
// API client - handles HTTP related task
std::shared_ptr<FingerprintApiClient> m_apiClient{nullptr};
// Remote lookup host
std::string m_lookupHost{"fplookupsvc.local"};
// Remote lookup port
uint16_t m_lookupPort{28090};
// number of connections in the pool
int m_connPoolSize{10};
// number of retries for remote call
int m_retryLimit{2};
// max lifetime of idle connection in seconds
int m_maxIdleSeconds{5};
// retry interval in seconds
int m_retryInterval{1};
public:
explicit FingerprintLookupClient(
const std::string &host,
uint16_t port = 28090,
int pool=10,
int retry=2,
int maxIdle=5,
int retryInterval=1);
~FingerprintLookupClient() = default;
};
My .cpp has the following:
FingerprintLookupClient::FingerprintLookupClient(
const std::string &host,
uint16_t port,
int pool,
int retry,
int maxIdle,
int retryInterval)
: m_lookupHost(host), m_lookupPort(port), m_connPoolSize(pool), m_retryLimit(retry), m_maxIdleSeconds(maxIdle), m_retryInterval(retryInterval)
{
auto connectionProvider = tcp::client::ConnectionProvider::createShared({host, port, oatpp::network::Address::IP_4});
// create connection pool
auto connectionPool = std::make_shared<ClientConnectionPool>(
connectionProvider,
m_connPoolSize,
std::chrono::seconds(m_maxIdleSeconds)
);
// create retry policy
auto retryPolicy = std::make_shared<client::SimpleRetryPolicy>(m_retryLimit, std::chrono::seconds(m_retryInterval));
// create request executor - default is HTTP, alternative is CURL
auto requestExecutor = client::HttpRequestExecutor::createShared(connectionPool, retryPolicy);
// Create ObjectMapper for serialization of DTOs
auto objectMapper = oatpp::parser::json::mapping::ObjectMapper::createShared();
m_apiClient = FingerprintApiClient::createShared(requestExecutor, objectMapper);
}
Compile error:
CXX libs/dlp/fp20svc/src/libdlp_fp20svc_la-FingerprintLookupClient.lo
In file included from /opt/gcc-12/include/c++/12.2.0/bits/stl_iterator.h:85,
from /opt/gcc-12/include/c++/12.2.0/bits/stl_algobase.h:67,
from /opt/gcc-12/include/c++/12.2.0/memory:63,
from /opt/3p/include/oatpp-1.3.0/oatpp/oatpp/core/base/Countable.hpp:28,
from /opt/3p/include/oatpp-1.3.0/oatpp/oatpp/core/data/mapping/type/./Type.hpp:28,
from /opt/3p/include/oatpp-1.3.0/oatpp/oatpp/core/data/mapping/type/Object.hpp:28,
from /opt/3p/include/oatpp-1.3.0/oatpp/oatpp/core/Types.hpp:28,
from /opt/3p/include/oatpp-1.3.0/oatpp/oatpp/web/client/./RetryPolicy.hpp:28,
from /opt/3p/include/oatpp-1.3.0/oatpp/oatpp/web/client/./RequestExecutor.hpp:28,
from /opt/3p/include/oatpp-1.3.0/oatpp/oatpp/web/client/HttpRequestExecutor.hpp:28,
from ../libs/dlp/fp20svc/src/FingerprintLookupClient.cpp:21:
/opt/gcc-12/include/c++/12.2.0/bits/stl_construct.h: In instantiation of ‘constexpr void std::_Construct(_Tp*, _Args&& ...) [with _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Args = {shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, chrono::duration<long int, ratio<1, 1> >}]’:
/opt/gcc-12/include/c++/12.2.0/bits/alloc_traits.h:635:19: required from ‘static constexpr void std::allocator_traits<std::allocator<void> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; allocator_type = std::allocator<void>]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr_base.h:604:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr_base.h:971:16: required from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Alloc = std::allocator<void>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr_base.h:1712:14: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr.h:464:59: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr.h:1009:14: required from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Args = {shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, chrono::duration<long int, ratio<1, 1> >}; _NonArray<_Tp> = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>]’
../libs/dlp/fp20svc/src/FingerprintLookupClient.cpp:47:65: required from here
/opt/gcc-12/include/c++/12.2.0/bits/stl_construct.h:115:28: error: no matching function for call to ‘construct_at(oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>*&, std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int>)’
115 | std::construct_at(__p, std::forward<_Args>(__args)...);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/gcc-12/include/c++/12.2.0/bits/stl_construct.h:94:5: note: candidate: ‘template<class _Tp, class ... _Args> constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*, _Args&& ...)’
94 | construct_at(_Tp* __location, _Args&&... __args)
| ^~~~~~~~~~~~
/opt/gcc-12/include/c++/12.2.0/bits/stl_construct.h:94:5: note: template argument deduction/substitution failed:
/opt/gcc-12/include/c++/12.2.0/bits/stl_construct.h: In substitution of ‘template<class _Tp, class ... _Args> constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*, _Args&& ...) [with _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}]’:
/opt/gcc-12/include/c++/12.2.0/bits/stl_construct.h:115:21: required from ‘constexpr void std::_Construct(_Tp*, _Args&& ...) [with _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Args = {shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, chrono::duration<long int, ratio<1, 1> >}]’
/opt/gcc-12/include/c++/12.2.0/bits/alloc_traits.h:635:19: required from ‘static constexpr void std::allocator_traits<std::allocator<void> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; allocator_type = std::allocator<void>]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr_base.h:604:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr_base.h:971:16: required from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Alloc = std::allocator<void>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr_base.h:1712:14: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr.h:464:59: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr.h:1009:14: required from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Args = {shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, chrono::duration<long int, ratio<1, 1> >}; _NonArray<_Tp> = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>]’
../libs/dlp/fp20svc/src/FingerprintLookupClient.cpp:47:65: required from here
/opt/gcc-12/include/c++/12.2.0/bits/stl_construct.h:96:17: error: no matching function for call to ‘oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>::Pool(std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int>)’
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/3p/include/oatpp-1.3.0/oatpp/oatpp/network/ConnectionPool.hpp:29,
from /opt/3p/include/oatpp-1.3.0/oatpp/oatpp/web/client/HttpRequestExecutor.hpp:31:
/opt/3p/include/oatpp-1.3.0/oatpp/oatpp/core/provider/Pool.hpp:426:3: note: candidate: ‘oatpp::provider::Pool<TProvider, TResource, AcquisitionProxyImpl>::Pool(const std::shared_ptr<_Tp>&, v_int64, v_int64, const std::chrono::duration<long int, std::ratio<1, 1000000> >&) [with TProvider = oatpp::network::ClientConnectionProvider; TResource = oatpp::data::stream::IOStream; AcquisitionProxyImpl = oatpp::network::ConnectionAcquisitionProxy; v_int64 = long int]’
426 | Pool(const std::shared_ptr<TProvider>& provider,
| ^~~~
/opt/3p/include/oatpp-1.3.0/oatpp/oatpp/core/provider/Pool.hpp:428:16: note: no known conversion for argument 3 from ‘std::chrono::duration<long int>’ to ‘v_int64’ {aka ‘long int’}
428 | v_int64 maxResourceTTL,
| ~~~~~~~~^~~~~~~~~~~~~~
/opt/gcc-12/include/c++/12.2.0/bits/stl_construct.h: In instantiation of ‘constexpr void std::_Construct(_Tp*, _Args&& ...) [with _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Args = {shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, chrono::duration<long int, ratio<1, 1> >}]’:
/opt/gcc-12/include/c++/12.2.0/bits/alloc_traits.h:635:19: required from ‘static constexpr void std::allocator_traits<std::allocator<void> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; allocator_type = std::allocator<void>]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr_base.h:604:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr_base.h:971:16: required from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Alloc = std::allocator<void>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr_base.h:1712:14: required from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr.h:464:59: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int, std::ratio<1, 1> >}; _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>]’
/opt/gcc-12/include/c++/12.2.0/bits/shared_ptr.h:1009:14: required from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>; _Args = {shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, chrono::duration<long int, ratio<1, 1> >}; _NonArray<_Tp> = oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>]’
../libs/dlp/fp20svc/src/FingerprintLookupClient.cpp:47:65: required from here
/opt/gcc-12/include/c++/12.2.0/bits/stl_construct.h:119:7: error: no matching function for call to ‘oatpp::provider::Pool<oatpp::network::ClientConnectionProvider, oatpp::data::stream::IOStream, oatpp::network::ConnectionAcquisitionProxy>::Pool(std::shared_ptr<oatpp::network::tcp::client::ConnectionProvider>&, int&, std::chrono::duration<long int>)’
119 | ::new((void*)__p) _Tp(std::forward<_Args>(__args)...);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/3p/include/oatpp-1.3.0/oatpp/oatpp/core/provider/Pool.hpp:426:3: note: candidate: ‘oatpp::provider::Pool<TProvider, TResource, AcquisitionProxyImpl>::Pool(const std::shared_ptr<_Tp>&, v_int64, v_int64, const std::chrono::duration<long int, std::ratio<1, 1000000> >&) [with TProvider = oatpp::network::ClientConnectionProvider; TResource = oatpp::data::stream::IOStream; AcquisitionProxyImpl = oatpp::network::ConnectionAcquisitionProxy; v_int64 = long int]’
426 | Pool(const std::shared_ptr<TProvider>& provider,
| ^~~~
/opt/3p/include/oatpp-1.3.0/oatpp/oatpp/core/provider/Pool.hpp:428:16: note: no known conversion for argument 3 from ‘std::chrono::duration<long int>’ to ‘v_int64’ {aka ‘long int’}
428 | v_int64 maxResourceTTL,
| ~~~~~~~~^~~~~~~~~~~~~~
make: *** [Makefile:41964: libs/dlp/fp20svc/src/libdlp_fp20svc_la-FingerprintLookupClient.lo] Error 1
ns-wxin commented
I noticed if I don't use connection pool, I'm able to create the client. So the following code would compile fine. But I really would like to use connection pool and retry policy.
auto connectionProvider = tcp::client::ConnectionProvider::createShared({host, port/*, oatpp::network::Address::IP_4*/});
/*
// create connection pool
auto connectionPool = std::make_shared<ClientConnectionPool>(
connectionProvider,
m_connPoolSize,
std::chrono::seconds(m_maxIdleSeconds)
);
// create retry policy
auto retryPolicy = std::make_shared<client::SimpleRetryPolicy>(m_retryLimit, std::chrono::seconds(m_retryInterval));
// create request executor - default is HTTP, alternative is CURL
auto requestExecutor = client::HttpRequestExecutor::createShared(connectionPool, retryPolicy);
*/
auto requestExecutor = client::HttpRequestExecutor::createShared(connectionProvider);
// Create ObjectMapper for serialization of DTOs
auto objectMapper = oatpp::parser::json::mapping::ObjectMapper::createShared();
m_apiClient = FingerprintApiClient::createShared(requestExecutor, objectMapper);
ns-wxin commented
Thanks to someone's response from the main repo. It turned out the connection pool needs to be created using
ClientConnectionPool::create_shared(connectionProvider,
m_connPoolSize,
std::chrono::seconds(m_maxIdleSeconds);
instead of directly using the constructor since the 2 call have slight difference in parameters. Closing this issue as resolved.