summaryrefslogtreecommitdiff
path: root/src/utils.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2021-07-31 09:43:49 +1000
committerMaxime Coste <mawww@kakoune.org>2021-07-31 09:43:49 +1000
commit914f4f8c192ca9b0742acb60869eca28702c2e7f (patch)
tree72e9fd8cde19ef94071fcda5bc2b5cae1dbd702b /src/utils.hh
parentb57dc7c512d25d71206489df3cb4baf054051c8f (diff)
Fix FunctionRef copy construction
The template constructor was mistaken as a copy constructor.
Diffstat (limited to 'src/utils.hh')
-rw-r--r--src/utils.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.hh b/src/utils.hh
index 9e055497..31781907 100644
--- a/src/utils.hh
+++ b/src/utils.hh
@@ -173,7 +173,7 @@ public:
}}
{}
- template<typename Target>
+ template<typename Target, typename = std::enable_if_t<!std::is_same_v<FunctionRef, std::decay_t<Target>>>>
FunctionRef(Target&& target)
: m_target{&target},
m_invoker{[](void* target, Args... args) {