Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_function_ref.hh')
-rw-r--r--source/blender/blenlib/BLI_function_ref.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_function_ref.hh b/source/blender/blenlib/BLI_function_ref.hh
index 71be7d7f029..c762756b474 100644
--- a/source/blender/blenlib/BLI_function_ref.hh
+++ b/source/blender/blenlib/BLI_function_ref.hh
@@ -80,6 +80,8 @@
*
*/
+#include "BLI_memory_utils.hh"
+
namespace blender {
template<typename Function> class FunctionRef;
@@ -125,8 +127,8 @@ template<typename Ret, typename... Params> class FunctionRef<Ret(Params...)> {
* another lambda.
*/
template<typename Callable,
- std::enable_if_t<!std::is_same_v<std::remove_cv_t<std::remove_reference_t<Callable>>,
- FunctionRef>> * = nullptr>
+ BLI_ENABLE_IF((
+ !std::is_same_v<std::remove_cv_t<std::remove_reference_t<Callable>>, FunctionRef>))>
FunctionRef(Callable &&callable)
: callback_(callback_fn<typename std::remove_reference_t<Callable>>),
callable_(reinterpret_cast<intptr_t>(&callable))