diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-03-29 00:18:28 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-03-29 00:18:57 +0100 |
commit | 3c0d80179c0f2053fb2b892ee9af47200cb5d539 (patch) | |
tree | 8b0598e344e6d97c1c1492af8e25ac36bccdb3f7 /deimos/core/base.h | |
parent | b70ed765ff6cf51aff20714e3ec4415b06898059 (diff) |
Separate the std-lite stuff
Diffstat (limited to 'deimos/core/base.h')
-rw-r--r-- | deimos/core/base.h | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/deimos/core/base.h b/deimos/core/base.h index 0cc48b1..5ff9090 100644 --- a/deimos/core/base.h +++ b/deimos/core/base.h @@ -73,13 +73,6 @@ struct SourceLocation {}
};
-template<typename T> struct RemoveReferenceT { using Type = T; };
-template<typename T> struct RemoveReferenceT<T&> { using Type = T; };
-template<typename T> struct RemoveReferenceT<T&&> { using Type = T; };
-template<typename T> using RemoveReference = RemoveReferenceT<T>::Type;
-
-template<typename T> constexpr bool kIsTriviallyDestructible = __is_trivially_destructible(T);
-
} // namespace deimos
constexpr void* operator new(deimos::uint64, void* ptr)
@@ -87,34 +80,5 @@ constexpr void* operator new(deimos::uint64, void* ptr) return ptr;
}
-namespace std
-{
-
-template<typename T>
-constexpr deimos::RemoveReference<T>&& move(T&& t) noexcept
-{
- return static_cast<deimos::RemoveReference<T>&&>(t);
-}
-
-template<typename T>
-constexpr T&& forward(deimos::RemoveReference<T>& t) noexcept
-{
- return static_cast<T&&>(t);
-}
-
-template<typename T>
-constexpr T&& forward(deimos::RemoveReference<T>&& t) noexcept // NOLINT
-{
- return static_cast<T&&>(t);
-}
-
-template<typename T, typename U = T>
-constexpr T exchange(T& obj, U&& new_value)
-{
- T old_value = std::move(obj);
- obj = std::forward<U>(new_value);
- return old_value;
-}
-
-} // namespace std
+#include "deimos/core/std.h"
|