From 82b627a0c087242b7b66dd1b25714f1d9daab818 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 11 Jan 2024 23:25:09 -0600 Subject: [PATCH] Explicit overload set for safe_value_cache::save. Some older compilers have problems with choosing the right overload when there's a general template vs typed arg functions. So remove template that we know should not match for other overloads. --- src/engine/value.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/engine/value.cpp b/src/engine/value.cpp index cae45dfacc..6f105872dc 100644 --- a/src/engine/value.cpp +++ b/src/engine/value.cpp @@ -8,6 +8,7 @@ Distributed under the Boost Software License, Version 1.0. #include "jam.h" #include "mem.h" +#include "mp.h" #include "object.h" #include "output.h" @@ -202,14 +203,17 @@ struct value_eq_f struct safe_value_cache { - template - value_ptr save(Args... args) + template + typename std::enable_if< + !std::is_same::type>::value, + value_ptr>::type + save(A0 a0, An... an) { - Test test_val(args...); + Test test_val(a0, an...); std::lock_guard guard(mutex); auto existing = cache.find(&test_val); if (existing != cache.end()) return *existing; - value_ptr result = Val::make(args...); + value_ptr result = Val::make(a0, an...); cache.insert(result); return result; }