#pragma once using uint8_t = unsigned char; using uint16_t = unsigned short; using uint32_t = unsigned int; using uint64_t = unsigned long long; using int8_t = char; using int16_t = short; using int32_t = int; using int64_t = long long; using size_t = uint64_t; static_assert(sizeof(size_t) == sizeof(void*), "size_t should be pointer size"); namespace std { template constexpr bool is_trivially_destructible_v = __is_trivially_destructible(T); template constexpr bool _is_same_helper = false; template constexpr bool _is_same_helper = true; template concept same_as = _is_same_helper && _is_same_helper; template struct make_void { using type = void; }; template using void_t = make_void::type; template struct _add_reference_helper { using lvalue = T; using rvalue = T; }; template struct _add_reference_helper> { using lvalue = T&; using rvalue = T&&; }; template using add_lvalue_reference_t = _add_reference_helper::lvalue; template using add_rvalue_reference_t = _add_reference_helper::rvalue; template struct remove_reference { using type = T; }; template struct remove_reference { using type = T; }; template struct remove_reference { using type = T; }; template using remove_reference_t = remove_reference::type; template consteval add_rvalue_reference_t declval() { static_assert(false, "Don't use declval outside of constant evaluation"); } template concept convertible_to = __is_convertible(From, To) && requires { static_cast(declval()); }; template constexpr remove_reference_t&& move(T&& r) noexcept { return static_cast&&>(r); } template constexpr T&& forward(remove_reference_t& r) noexcept { return static_cast(r); } template constexpr T&& forward(remove_reference_t&& r) noexcept // NOLINT { return static_cast(r); } template constexpr T exchange(T& obj, U&& new_value) { T old_value = std::move(obj); obj = std::forward(new_value); return old_value; } enum __attribute__((__may_alias__)) byte : uint8_t {}; static_assert(sizeof(byte) == 1, ""); } // namespace std static_assert(std::same_as, ""); static_assert(!std::same_as, ""); static_assert(std::same_as, int>, ""); static_assert(std::same_as, int>, ""); static_assert(std::same_as, int>, ""); static_assert(std::same_as, int&>, ""); static_assert(std::same_as, int&>, ""); static_assert(std::same_as, int&>, ""); static_assert(std::same_as, void>, ""); static_assert(std::same_as, int&&>, ""); static_assert(std::same_as, int&>, ""); static_assert(std::same_as, int&&>, ""); static_assert(std::same_as, void>, ""); static_assert(std::convertible_to, ""); static_assert(!std::convertible_to, ""); constexpr void* operator new(size_t, void* ptr) { return ptr; }