From afc94e62f2d1eb930b9ad4c5d4f7b4afc9f58e65 Mon Sep 17 00:00:00 2001 From: skypjack Date: Wed, 17 Dec 2025 14:00:57 +0100 Subject: [PATCH] config: drop ENTT_CONSTEVAL --- src/entt/config/config.h | 12 ------------ src/entt/core/hashed_string.hpp | 8 ++++---- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/entt/config/config.h b/src/entt/config/config.h index bbfa60240..115f00827 100644 --- a/src/entt/config/config.h +++ b/src/entt/config/config.h @@ -15,18 +15,6 @@ # define ENTT_CATCH if(false) #endif -#if __has_include() -# include -# -# if defined(__cpp_consteval) -# define ENTT_CONSTEVAL consteval -# endif -#endif - -#ifndef ENTT_CONSTEVAL -# define ENTT_CONSTEVAL constexpr -#endif - #ifdef ENTT_USE_ATOMIC # include # define ENTT_MAYBE_ATOMIC(Type) std::atomic diff --git a/src/entt/core/hashed_string.hpp b/src/entt/core/hashed_string.hpp index c01e6d535..090f1000b 100644 --- a/src/entt/core/hashed_string.hpp +++ b/src/entt/core/hashed_string.hpp @@ -93,7 +93,7 @@ public: */ template // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays) - [[nodiscard]] static ENTT_CONSTEVAL hash_type value(const value_type (&str)[N]) noexcept { + [[nodiscard]] static consteval hash_type value(const value_type (&str)[N]) noexcept { return basic_hashed_string{str}; } @@ -132,7 +132,7 @@ public: */ template // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays) - ENTT_CONSTEVAL basic_hashed_string(const value_type (&str)[N]) noexcept + consteval basic_hashed_string(const value_type (&str)[N]) noexcept // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay) : base_type{str} { for(; str[base_type::length]; ++base_type::length) { @@ -297,7 +297,7 @@ inline namespace literals { * @param str The literal without its suffix. * @return A properly initialized hashed string. */ -[[nodiscard]] ENTT_CONSTEVAL hashed_string operator""_hs(const char *str, std::size_t) noexcept { +[[nodiscard]] consteval hashed_string operator""_hs(const char *str, std::size_t) noexcept { return hashed_string{str}; } @@ -306,7 +306,7 @@ inline namespace literals { * @param str The literal without its suffix. * @return A properly initialized hashed wstring. */ -[[nodiscard]] ENTT_CONSTEVAL hashed_wstring operator""_hws(const wchar_t *str, std::size_t) noexcept { +[[nodiscard]] consteval hashed_wstring operator""_hws(const wchar_t *str, std::size_t) noexcept { return hashed_wstring{str}; }