summaryrefslogtreecommitdiffhomepage
path: root/compat/meta.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/meta.hpp')
-rw-r--r--compat/meta.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/compat/meta.hpp b/compat/meta.hpp
index 11c5ca0f..a116cebc 100644
--- a/compat/meta.hpp
+++ b/compat/meta.hpp
@@ -45,6 +45,15 @@ namespace meta::detail {
{
using type = to<xs...>;
};
+
+ template<typename...> struct cons_;
+
+ template<template<typename...> class t, typename x, typename... xs>
+ struct cons_<t<xs...>, x>
+ {
+ using type = t<x, xs...>;
+ };
+
} // ns meta::detail
namespace meta {
@@ -66,5 +75,9 @@ namespace meta {
template<typename... xs>
using last = lift<first, reverse<xs...>>;
+
+ template<typename... xs>
+ using cons = detail::cons_<xs...>;
+
} // ns meta