mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Misc: A few more advstd imports from C++17
This commit is contained in:
@@ -64,12 +64,25 @@ namespace advstd
|
|||||||
// C++17 std::is_floating_point_v
|
// C++17 std::is_floating_point_v
|
||||||
forward_1v(is_floating_point, bool);
|
forward_1v(is_floating_point, bool);
|
||||||
|
|
||||||
|
// C++17 std::is_pointer_v
|
||||||
|
forward_1v(is_pointer, bool);
|
||||||
|
|
||||||
|
// C++17 std::is_reference_v
|
||||||
|
forward_1v(is_reference, bool);
|
||||||
|
|
||||||
// C++17 std::tuple_size_v
|
// C++17 std::tuple_size_v
|
||||||
forward_1v(tuple_size, size_t);
|
forward_1v(tuple_size, size_t);
|
||||||
|
|
||||||
#undef forward_1v
|
#undef forward_1v
|
||||||
#undef forward_2v
|
#undef forward_2v
|
||||||
|
|
||||||
|
// C++17 std::size
|
||||||
|
template <class C>
|
||||||
|
constexpr auto size(const C& c) -> decltype(c.size()) { return c.size(); }
|
||||||
|
|
||||||
|
template <class T, std::size_t N>
|
||||||
|
constexpr std::size_t size(const T(&array)[N]) noexcept { return N; }
|
||||||
|
|
||||||
// C++20 std::remove_cvref_t
|
// C++20 std::remove_cvref_t
|
||||||
template <class T>
|
template <class T>
|
||||||
using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>;
|
using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>;
|
||||||
|
|||||||
Reference in New Issue
Block a user