summaryrefslogtreecommitdiff
path: root/src/value.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2020-11-11 21:43:27 +1100
committerMaxime Coste <mawww@kakoune.org>2021-11-21 09:44:56 +1100
commitfb4cef5b61639c507e6c5740cc5973d0d79ba673 (patch)
tree751e533a39d9a51be6b8af9e4abe6af75df00e87 /src/value.hh
parent04f11c2af3e0ecdc78df9800d381b2fdc46af3b7 (diff)
Replace std::enable_if with requires
Introduce some concepts for enum and flags handling, goodbye and thanks for all the fish std::enable_if.
Diffstat (limited to 'src/value.hh')
-rw-r--r--src/value.hh3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/value.hh b/src/value.hh
index 51394c7d..aa53afb8 100644
--- a/src/value.hh
+++ b/src/value.hh
@@ -16,8 +16,7 @@ struct Value
{
Value() = default;
- template<typename T,
- typename = std::enable_if_t<not std::is_same<Value, T>::value>>
+ template<typename T> requires (not std::is_same_v<Value, T>)
Value(T&& val)
: m_value{new Model<std::decay_t<T>>{std::forward<T>(val)}} {}