export module Core.Meta; namespace Core { template struct BaseRemovePointer final { using Type = T; }; template struct BaseRemovePointer final { using Type = T; }; template struct BaseRemoveReference final { using Type = T; }; template struct BaseRemoveReference final { using Type = T; }; template struct BaseRemoveReference final { using Type = T; }; template struct BaseIsSame final { static constexpr bool value = false; }; template struct BaseIsSame final { static constexpr bool value = true; }; template struct BaseIf final { using Type = A; }; template struct BaseIf final { using Type = B; }; } export namespace Core { template concept Iterable = requires(T& t) { t.begin(); t.end(); }; template using RemovePointer = BaseRemovePointer::Type; template using RemoveReference = BaseRemoveReference::Type; template constexpr bool IsSame = BaseIsSame::value; template using If = BaseIf::Type; template constexpr RemoveReference&& move(T&& t) noexcept { return static_cast&&>(t); } template concept Moveable = requires(T t) { requires noexcept(T(Core::move(t))); requires noexcept(t = T(Core::move(t))); }; template constexpr T&& forward(RemoveReference& t) noexcept { return static_cast(t); } template constexpr T&& forward(RemoveReference&& t) noexcept { return static_cast(t); } template void swap(T& a, T& b) noexcept { T tmp = Core::move(a); a = Core::move(b); b = Core::move(tmp); } }