Browse Source

locator: adjust noexcept policy

Michele Caini 4 years ago
parent
commit
1a9a423c35
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/entt/locator/locator.hpp

+ 3 - 3
src/entt/locator/locator.hpp

@@ -24,7 +24,7 @@ namespace entt {
  * @tparam Service Service type.
  */
 template<typename Service>
-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<typename Impl = Service, typename... Args>
-    [[nodiscard]] static Service &value_or(Args &&...args) ENTT_NOEXCEPT {
+    [[nodiscard]] static Service &value_or(Args &&...args) {
         return service ? *service : emplace<Impl>(std::forward<Args>(args)...);
     }
 
@@ -100,7 +100,7 @@ struct locator {
     }
 
     /*! @brief Resets a service. */
-    static void reset() {
+    static void reset() ENTT_NOEXCEPT {
         service.reset();
     }