summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/functional.hpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/compat/functional.hpp b/compat/functional.hpp
index 141bbef7..893fe1a0 100644
--- a/compat/functional.hpp
+++ b/compat/functional.hpp
@@ -4,14 +4,12 @@
#include <iterator>
#include <type_traits>
-namespace functools
-{
-
-constexpr void return_void();
-
template<typename t>
using remove_qualifiers = std::remove_reference_t<std::remove_cv_t<t>>;
+namespace functools
+{
+
template<typename seq_, typename = void>
struct reserver_
{
@@ -22,7 +20,7 @@ struct reserver_
};
template<typename seq_>
-struct reserver_<seq_, decltype(std::declval<seq_>().reserve(0u), return_void())>
+struct reserver_<seq_, decltype(std::declval<seq_>().reserve(0u), (void)0)>
{
static inline void maybe_reserve_space(seq_& seq, unsigned sz)
{
@@ -54,7 +52,7 @@ struct constant final
template<typename seq_, typename F>
auto map(F&& fun, const seq_& seq)
{
- using seq_type = functools::remove_qualifiers<seq_>;
+ using seq_type = remove_qualifiers<seq_>;
seq_type ret;
std::back_insert_iterator<seq_type> it = std::back_inserter(ret);