2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 13:37:55 +00:00

[#891,!592] use c++11 syntax - compile without errors on clang and g++

This commit is contained in:
Razvan Becheriu
2019-11-18 12:16:20 +02:00
parent ea9cc210b7
commit ea07b72c0e

View File

@@ -67,7 +67,7 @@ public:
/// @param f the functor to call
/// @result the result of the functor call
template<typename Lockable, typename Callable>
static auto call(Lockable& lk, const Callable& f) {
static auto call(Lockable& lk, const Callable& f) -> decltype(f()) {
if (MultiThreadingMgr::instance().getMode()) {
std::lock_guard<Lockable> lock(lk);
return f();