diff options
| author | 2021-09-18 01:09:23 +1000 | |
|---|---|---|
| committer | 2021-09-18 01:09:23 +1000 | |
| commit | d1e68f25dd9ce56c623cfdd96425bad0fa35dcdb (patch) | |
| tree | c8f7430c1ce45847001d493d8f7eee10a6b87ecf /src/lib/util/delegate.cpp | |
| parent | 6e3adb71999938f3a05a5bae4f108c701af3e77a (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.cpp | 5 |
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 |
