summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/delegate.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-09-18 01:09:23 +1000
committer Vas Crabb <vas@vastheman.com>2021-09-18 01:09:23 +1000
commitd1e68f25dd9ce56c623cfdd96425bad0fa35dcdb (patch)
treec8f7430c1ce45847001d493d8f7eee10a6b87ecf /src/lib/util/delegate.cpp
parent6e3adb71999938f3a05a5bae4f108c701af3e77a (diff)
util/strformat.h, util/delegate.h: More cleanup and future-proofing.
* util/strformat.h: Found a SFINAE trick to detect absence of stream-out operators. Fixes building with C++20 standard library (#6275). * util/delegate.h: Fixed a commend and removed an unused declaration from MSVC member function pointer wrapper. * util/delegate.h: Added support for discarding functoid return values for delegates returning void. * util/delegate.h: Added support for using std::ref to bind non-copyable functoids.
Diffstat (limited to 'src/lib/util/delegate.cpp')
-rw-r--r--src/lib/util/delegate.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/util/delegate.cpp b/src/lib/util/delegate.cpp
index 8c816928625..0fbc6e91f94 100644
--- a/src/lib/util/delegate.cpp
+++ b/src/lib/util/delegate.cpp
@@ -24,6 +24,7 @@
#endif
+namespace util::detail {
//**************************************************************************
// GLOBAL VARIABLES
@@ -31,7 +32,7 @@
#if (USE_DELEGATE_TYPE == DELEGATE_TYPE_COMPATIBLE)
-delegate_mfp::raw_mfp_data delegate_mfp::s_null_mfp = { { 0 } };
+const delegate_mfp::raw_mfp_data delegate_mfp::s_null_mfp = { { 0 } };
#endif
@@ -82,3 +83,5 @@ delegate_generic_function delegate_mfp::convert_to_generic(delegate_generic_clas
}
#endif
+
+} // namespace util::detail