summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/value.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/value.hh b/src/value.hh
index 1a287b0b..3c6eb7fb 100644
--- a/src/value.hh
+++ b/src/value.hh
@@ -4,6 +4,7 @@
#include "unordered_map.hh"
#include "units.hh"
+#include <type_traits>
#include <memory>
namespace Kakoune
@@ -15,7 +16,8 @@ struct Value
{
Value() = default;
- template<typename T>
+ template<typename T,
+ typename = typename std::enable_if<not std::is_same<Value, T>::value>::type>
Value(T&& val) : m_value{new Model<T>{std::forward<T>(val)}} {}
Value(const Value& val) = delete;