From 61e5bcef2629e2d68b805a956a96fff264d4f74d Mon Sep 17 00:00:00 2001 From: untodesu Date: Sat, 28 Jun 2025 01:59:49 +0500 Subject: Restructure dependencies and update to C++20 - Nuked static_assert from almost everywhere in the project - Nuked binary dependency support. Might add one later though - Separated dependency headers into a separate include subdirectory - Grafted a thirdpartylegalnotices.txt generator from RITEG - Pushed development snapshot version to 2126 (26th week of 2025) --- deps/include/entt/core/tuple.hpp | 95 ---------------------------------------- 1 file changed, 95 deletions(-) delete mode 100644 deps/include/entt/core/tuple.hpp (limited to 'deps/include/entt/core/tuple.hpp') diff --git a/deps/include/entt/core/tuple.hpp b/deps/include/entt/core/tuple.hpp deleted file mode 100644 index a64c51c..0000000 --- a/deps/include/entt/core/tuple.hpp +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef ENTT_CORE_TUPLE_HPP -#define ENTT_CORE_TUPLE_HPP - -#include -#include -#include - -namespace entt { - -/*! @cond TURN_OFF_DOXYGEN */ -namespace internal { - -template -struct is_tuple_impl: std::false_type {}; - -template -struct is_tuple_impl>: std::true_type {}; - -} // namespace internal -/*! @endcond */ - -/** - * @brief Provides the member constant `value` to true if a given type is a - * tuple, false otherwise. - * @tparam Type The type to test. - */ -template -struct is_tuple: internal::is_tuple_impl> {}; - -/** - * @brief Helper variable template. - * @tparam Type The type to test. - */ -template -inline constexpr bool is_tuple_v = is_tuple::value; - -/** - * @brief Utility function to unwrap tuples of a single element. - * @tparam Type Tuple type of any sizes. - * @param value A tuple object of the given type. - * @return The tuple itself if it contains more than one element, the first - * element otherwise. - */ -template -constexpr decltype(auto) unwrap_tuple(Type &&value) noexcept { - if constexpr(std::tuple_size_v> == 1u) { - return std::get<0>(std::forward(value)); - } else { - return std::forward(value); - } -} - -/** - * @brief Utility class to forward-and-apply tuple objects. - * @tparam Func Type of underlying invocable object. - */ -template -struct forward_apply: private Func { - /** - * @brief Constructs a forward-and-apply object. - * @tparam Args Types of arguments to use to construct the new instance. - * @param args Parameters to use to construct the instance. - */ - template - constexpr forward_apply(Args &&...args) noexcept(std::is_nothrow_constructible_v) - : Func{std::forward(args)...} {} - - /** - * @brief Forwards and applies the arguments with the underlying function. - * @tparam Type Tuple-like type to forward to the underlying function. - * @param args Parameters to forward to the underlying function. - * @return Return value of the underlying function, if any. - */ - template - constexpr decltype(auto) operator()(Type &&args) noexcept(noexcept(std::apply(std::declval(), args))) { - return std::apply(static_cast(*this), std::forward(args)); - } - - /*! @copydoc operator()() */ - template - constexpr decltype(auto) operator()(Type &&args) const noexcept(noexcept(std::apply(std::declval(), args))) { - return std::apply(static_cast(*this), std::forward(args)); - } -}; - -/** - * @brief Deduction guide. - * @tparam Func Type of underlying invocable object. - */ -template -forward_apply(Func) -> forward_apply>>; - -} // namespace entt - -#endif -- cgit