locator: adjust noexcept policy

This commit is contained in:
Michele Caini
2022-02-16 12:33:22 +01:00
parent 7b0449213c
commit 1a9a423c35
+3 -3
View File
@@ -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();
}