From 1a9a423c35a22cd310f93ffa263b294e829a52ac Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Tue, 15 Feb 2022 10:31:22 +0100 Subject: [PATCH] locator: adjust noexcept policy --- src/entt/locator/locator.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/entt/locator/locator.hpp b/src/entt/locator/locator.hpp index 47f0c8adf..7387aa057 100644 --- a/src/entt/locator/locator.hpp +++ b/src/entt/locator/locator.hpp @@ -24,7 +24,7 @@ namespace entt { * @tparam Service Service type. */ template -struct locator { +struct locator final { /*! @brief Service type. */ using type = Service; @@ -67,7 +67,7 @@ struct locator { * @return A reference to a valid service. */ template - [[nodiscard]] static Service &value_or(Args &&...args) ENTT_NOEXCEPT { + [[nodiscard]] static Service &value_or(Args &&...args) { return service ? *service : emplace(std::forward(args)...); } @@ -100,7 +100,7 @@ struct locator { } /*! @brief Resets a service. */ - static void reset() { + static void reset() ENTT_NOEXCEPT { service.reset(); }