From 4228e82740f62b841799cfca04861fa217fb93a5 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Thu, 1 Aug 2024 00:56:05 +0200 Subject: More work on taxonomy --- asl/meta/types.hpp | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) (limited to 'asl/meta/types.hpp') diff --git a/asl/meta/types.hpp b/asl/meta/types.hpp index 79ccf5e..bfc2998 100644 --- a/asl/meta/types.hpp +++ b/asl/meta/types.hpp @@ -1,36 +1,13 @@ #pragma once -namespace asl { +#include "asl/meta/internal/types.hpp" +namespace asl { + template using void_t = void; -template -inline constexpr bool is_referenceable = false; - -template -inline constexpr bool is_referenceable> = true; - -namespace internal { - -template> -struct as_ref_helper { using lvalue = T; using rvalue = T; }; - -template -struct as_ref_helper { using lvalue = T&; using rvalue = T&&; }; - -template struct un_ref_helper { using type = T; }; -template struct un_ref_helper { using type = T; }; -template struct un_ref_helper { using type = T; }; - -} // namespace internal - -template using as_ref_t = internal::as_ref_helper::lvalue; -template using as_rref_t = internal::as_ref_helper::rvalue; - -template using un_ref_t = internal::un_ref_helper::type; - -#define AslMove(expr_) (static_cast<::asl::as_rref_t<::asl::un_ref_t>>(expr_)) -#define AslForward(expr_) (static_cast<::asl::as_rref_t>(expr_)) +template +concept same = internal::is_same && internal::is_same; } // namespace asl -- cgit