From 11a32d8ac39dcd8982fb5e48fa1eb41db85e2db8 Mon Sep 17 00:00:00 2001 From: xyz1001 Date: Mon, 21 Apr 2025 14:54:39 +0800 Subject: [PATCH] fix compile error with gcc 14 because of missing necessary header --- include/nonstd/scope.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/nonstd/scope.hpp b/include/nonstd/scope.hpp index 44d1ab8..c2ebab4 100644 --- a/include/nonstd/scope.hpp +++ b/include/nonstd/scope.hpp @@ -249,7 +249,8 @@ namespace nonstd #define scope_HAVE_IS_NOTHROW_ASSIGNABLE scope_CPP11_110 #define scope_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE scope_CPP11_110 -#define scope_HAVE_REFERENCE_WRAPPER scope_CPP11_110 +#define scope_HAVE_FUNCATIONAL scope_CPP11_110 +#define scope_HAVE_REFERENCE_WRAPPER scope_HAVE_FUNCATIONAL #define scope_HAVE_REMOVE_CV scope_CPP11_90 #define scope_HAVE_REMOVE_REFERENCE scope_CPP11_90 @@ -329,6 +330,10 @@ namespace nonstd #include // std::numeric_limits<> #include // move(), forward<>(), swap() +#if scope_HAVE_FUNCATIONAL +# include +#endif + #if scope_HAVE_TYPE_TRAITS # include #elif scope_HAVE_TR1_TYPE_TRAITS