summaryrefslogtreecommitdiffhomepage
path: root/compat/functional.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-09-23 19:21:45 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-09-23 19:21:45 +0200
commitec34d6575fa03f1e137739ee1946f0ba9d3f2830 (patch)
tree7aa2ba948a8c2656145aa60f992aad8d96f33534 /compat/functional.hpp
parent40c45a336489103b1da50e07479dd2808ae304d6 (diff)
compat: use c++17-style value templates
Diffstat (limited to 'compat/functional.hpp')
-rw-r--r--compat/functional.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/compat/functional.hpp b/compat/functional.hpp
index f7cd95c7..dcba0538 100644
--- a/compat/functional.hpp
+++ b/compat/functional.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include "value-templates.hpp"
+
#include <algorithm>
#include <iterator>
#include <type_traits>
@@ -70,7 +72,7 @@ auto remove_if_not(F&& fun, const seq_& seq)
using seq_type = std::decay_t<seq_>;
using value_type = std::decay_t<typename std::iterator_traits<decltype(std::begin(seq))>::value_type>;
using fun_ret_type = decltype(fun(std::declval<value_type>()));
- static_assert(std::is_convertible<fun_ret_type, bool>::value, "must return bool");
+ static_assert(is_convertible_v<fun_ret_type, bool>, "must return bool");
seq_type ret;
maybe_reserve_space(ret, seq.size());