summaryrefslogtreecommitdiffhomepage
path: root/compat/meta.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-02 08:20:47 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-02 09:34:17 +0200
commitf2faf7acf4445fef2a149ebbdecb569a2d119d94 (patch)
tree6629ba211a70a54a0ab82f6c4f4de08504072951 /compat/meta.hpp
parent66e75860d0c54baa39ed789442b09b96eeebe2e6 (diff)
nothing important
Diffstat (limited to 'compat/meta.hpp')
-rw-r--r--compat/meta.hpp35
1 files changed, 16 insertions, 19 deletions
diff --git a/compat/meta.hpp b/compat/meta.hpp
index 8682fdc8..11c5ca0f 100644
--- a/compat/meta.hpp
+++ b/compat/meta.hpp
@@ -11,9 +11,7 @@
static_assert(sizeof...(x) == ~0ul); \
static_assert(sizeof...(x) == 0u)
-namespace meta {
-
-namespace detail {
+namespace meta::detail {
template<typename... xs>
struct tuple;
@@ -47,27 +45,26 @@ namespace detail {
{
using type = to<xs...>;
};
-} // ns detail
-
-
-template<typename... xs>
-using reverse = typename detail::reverse_<detail::tuple<xs...>, detail::tuple<>>::type;
+} // ns meta::detail
-// the to/from order is awkward but mimics function composition
-template<template<typename...> class to, typename from>
-using lift = typename detail::lift_<to, from>::type;
+namespace meta {
+ template<typename... xs>
+ using reverse = typename detail::reverse_<detail::tuple<xs...>, detail::tuple<>>::type;
-template<typename x, typename... xs>
-using first = x;
+ // the to/from order is awkward but mimics function composition
+ template<template<typename...> class to, typename from>
+ using lift = typename detail::lift_<to, from>::type;
-template<typename x, typename... xs>
-using rest = detail::tuple<xs...>;
+ template<typename x, typename... xs>
+ using first = x;
-template<typename... xs>
-using butlast = reverse<rest<reverse<xs...>>>;
+ template<typename x, typename... xs>
+ using rest = detail::tuple<xs...>;
-template<typename... xs>
-using last = lift<first, reverse<xs...>>;
+ template<typename... xs>
+ using butlast = reverse<rest<reverse<xs...>>>;
+ template<typename... xs>
+ using last = lift<first, reverse<xs...>>;
} // ns meta