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/meta/resolve.hpp | 102 ------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 deps/include/entt/meta/resolve.hpp (limited to 'deps/include/entt/meta/resolve.hpp') diff --git a/deps/include/entt/meta/resolve.hpp b/deps/include/entt/meta/resolve.hpp deleted file mode 100644 index a9f2f93..0000000 --- a/deps/include/entt/meta/resolve.hpp +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef ENTT_META_RESOLVE_HPP -#define ENTT_META_RESOLVE_HPP - -#include -#include "../core/type_info.hpp" -#include "../locator/locator.hpp" -#include "context.hpp" -#include "meta.hpp" -#include "node.hpp" -#include "range.hpp" - -namespace entt { - -/** - * @brief Returns the meta type associated with a given type. - * @tparam Type Type to use to search for a meta type. - * @param ctx The context from which to search for meta types. - * @return The meta type associated with the given type, if any. - */ -template -[[nodiscard]] meta_type resolve(const meta_ctx &ctx) noexcept { - auto &&context = internal::meta_context::from(ctx); - return {ctx, internal::resolve>>(context)}; -} - -/** - * @brief Returns the meta type associated with a given type. - * @tparam Type Type to use to search for a meta type. - * @return The meta type associated with the given type, if any. - */ -template -[[nodiscard]] meta_type resolve() noexcept { - return resolve(locator::value_or()); -} - -/** - * @brief Returns a range to use to visit all meta types. - * @param ctx The context from which to search for meta types. - * @return An iterable range to use to visit all meta types. - */ -[[nodiscard]] inline meta_range resolve(const meta_ctx &ctx) noexcept { - auto &&context = internal::meta_context::from(ctx); - return {{ctx, context.value.cbegin()}, {ctx, context.value.cend()}}; -} - -/** - * @brief Returns a range to use to visit all meta types. - * @return An iterable range to use to visit all meta types. - */ -[[nodiscard]] inline meta_range resolve() noexcept { - return resolve(locator::value_or()); -} - -/** - * @brief Returns the meta type associated with a given identifier, if any. - * @param ctx The context from which to search for meta types. - * @param id Unique identifier. - * @return The meta type associated with the given identifier, if any. - */ -[[nodiscard]] inline meta_type resolve(const meta_ctx &ctx, const id_type id) noexcept { - for(auto &&curr: resolve(ctx)) { - if(curr.second.id() == id) { - return curr.second; - } - } - - return meta_type{}; -} - -/** - * @brief Returns the meta type associated with a given identifier, if any. - * @param id Unique identifier. - * @return The meta type associated with the given identifier, if any. - */ -[[nodiscard]] inline meta_type resolve(const id_type id) noexcept { - return resolve(locator::value_or(), id); -} - -/** - * @brief Returns the meta type associated with a given type info object. - * @param ctx The context from which to search for meta types. - * @param info The type info object of the requested type. - * @return The meta type associated with the given type info object, if any. - */ -[[nodiscard]] inline meta_type resolve(const meta_ctx &ctx, const type_info &info) noexcept { - auto &&context = internal::meta_context::from(ctx); - const auto *elem = internal::try_resolve(context, info); - return elem ? meta_type{ctx, *elem} : meta_type{}; -} - -/** - * @brief Returns the meta type associated with a given type info object. - * @param info The type info object of the requested type. - * @return The meta type associated with the given type info object, if any. - */ -[[nodiscard]] inline meta_type resolve(const type_info &info) noexcept { - return resolve(locator::value_or(), info); -} - -} // namespace entt - -#endif -- cgit