summaryrefslogtreecommitdiff
path: root/asl/meta/internal/refs.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-08-06 00:34:57 +0200
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-08-07 23:25:42 +0200
commit75b10758ba116eabed730d23e957f1d69a1e3cb8 (patch)
tree6fb656d6aa18e3b8fd67d0fed39b79234a23fc1d /asl/meta/internal/refs.hpp
parent4228e82740f62b841799cfca04861fa217fb93a5 (diff)
Type traits
Diffstat (limited to 'asl/meta/internal/refs.hpp')
-rw-r--r--asl/meta/internal/refs.hpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/asl/meta/internal/refs.hpp b/asl/meta/internal/refs.hpp
deleted file mode 100644
index b21a0a1..0000000
--- a/asl/meta/internal/refs.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#pragma once
-
-#include "asl/meta/types.hpp"
-
-namespace asl::internal {
-
-template<typename T, typename = void>
-inline constexpr bool is_referenceable = false;
-
-template<typename T>
-inline constexpr bool is_referenceable<T, void_t<T&>> = true;
-
-template<typename T, bool = is_referenceable<T>>
-struct as_ref_helper { using lvalue = T; using rvalue = T; };
-
-template<typename T>
-struct as_ref_helper<T, true> { using lvalue = T&; using rvalue = T&&; };
-
-template<typename T> struct un_ref_helper { using type = T; };
-template<typename T> struct un_ref_helper<T&> { using type = T; };
-template<typename T> struct un_ref_helper<T&&> { using type = T; };
-
-template<typename T>
-struct is_ref_helper
-{
- static inline constexpr bool lref = false;
- static inline constexpr bool rref = false;
-};
-
-template<typename T>
-struct is_ref_helper<T&>
-{
- static inline constexpr bool lref = true;
- static inline constexpr bool rref = false;
-};
-
-template<typename T>
-struct is_ref_helper<T&&>
-{
- static inline constexpr bool lref = false;
- static inline constexpr bool rref = true;
-};
-
-} // namespace asl::internal
-