This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 874496efc73d3cb929fa13c564f0a045ed057984
Author: Ferenc Gerlits <[email protected]>
AuthorDate: Tue Oct 24 13:03:14 2023 +0200

    MINIFICPP-2254 Fix template error in VS2022 build
    
    The concept-based function overloading in map_args used to work in
    Visual Studio 2019, and also in Visual Studio 2022 up to version 19.35.
    Since version 19.36, it has stopped working. The version with requires
    instead of the concept works in all versions, up to 19.37.
    
    Closes #1687
    
    Signed-off-by: Marton Szasz <[email protected]>
---
 libminifi/include/core/logging/Logger.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libminifi/include/core/logging/Logger.h 
b/libminifi/include/core/logging/Logger.h
index 13a35d54e..4a011021f 100644
--- a/libminifi/include/core/logging/Logger.h
+++ b/libminifi/include/core/logging/Logger.h
@@ -98,8 +98,8 @@ class BaseLogger {
   [[nodiscard]] virtual LOG_LEVEL level() const = 0;
 };
 
-const auto inline map_args = utils::overloaded {
-    [](std::invocable<> auto&& f) { return 
std::invoke(std::forward<decltype(f)>(f)); },
+inline constexpr auto map_args = utils::overloaded {
+    [](auto&& f) requires(std::is_invocable_v<decltype(f)>) { return 
std::invoke(std::forward<decltype(f)>(f)); },
     [](auto&& value) { return std::forward<decltype(value)>(value); }
 };
 

Reply via email to