mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-23 23:34:12 +03:00
Make sure we do not put a Value in a Value
This commit is contained in:
parent
3977b7f9a6
commit
b579f90bae
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user