From 75cd5f169ff263caee439f2973f18de6153b8f88 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Sat, 10 Apr 2021 16:41:53 +0200 Subject: [PATCH] *: review deduction guides --- src/entt/core/hashed_string.hpp | 2 +- src/entt/core/utility.hpp | 3 ++- src/entt/entity/handle.hpp | 6 ++++-- src/entt/entity/helper.hpp | 26 ++++++++++++-------------- src/entt/entity/view.hpp | 2 +- src/entt/signal/delegate.hpp | 6 +++--- src/entt/signal/sigh.hpp | 3 ++- 7 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/entt/core/hashed_string.hpp b/src/entt/core/hashed_string.hpp index 633bbfa0c..978d2cb13 100644 --- a/src/entt/core/hashed_string.hpp +++ b/src/entt/core/hashed_string.hpp @@ -212,7 +212,7 @@ private: * @param str Human-readable identifer. */ template -basic_hashed_string(const Char (&str)[N]) ENTT_NOEXCEPT +basic_hashed_string(const Char (&str)[N]) -> basic_hashed_string; diff --git a/src/entt/core/utility.hpp b/src/entt/core/utility.hpp index 5a7ec16a9..4e081b742 100644 --- a/src/entt/core/utility.hpp +++ b/src/entt/core/utility.hpp @@ -60,7 +60,8 @@ struct overloaded: Func... { * @tparam Func Types of function objects. */ template -overloaded(Func...) -> overloaded; +overloaded(Func...) +-> overloaded; /** diff --git a/src/entt/entity/handle.hpp b/src/entt/entity/handle.hpp index a074c25e8..195c8bbfa 100644 --- a/src/entt/entity/handle.hpp +++ b/src/entt/entity/handle.hpp @@ -324,7 +324,8 @@ bool operator!=(const basic_handle &lhs, const basic_handle &rhs) E * @tparam Entity A valid entity type (see entt_traits for more details). */ template -basic_handle(basic_registry &, Entity) -> basic_handle; +basic_handle(basic_registry &, Entity) +-> basic_handle; /** @@ -332,7 +333,8 @@ basic_handle(basic_registry &, Entity) -> basic_handle; * @tparam Entity A valid entity type (see entt_traits for more details). */ template -basic_handle(const basic_registry &, Entity) -> basic_handle; +basic_handle(const basic_registry &, Entity) +-> basic_handle; } diff --git a/src/entt/entity/helper.hpp b/src/entt/entity/helper.hpp index 1ec5852da..43aa08470 100644 --- a/src/entt/entity/helper.hpp +++ b/src/entt/entity/helper.hpp @@ -48,19 +48,18 @@ private: /** * @brief Deduction guide. - * - * It allows to deduce the constness of a registry directly from the instance - * provided to the constructor. - * * @tparam Entity A valid entity type (see entt_traits for more details). */ template -as_view(basic_registry &) ENTT_NOEXCEPT -> as_view; +as_view(basic_registry &) -> as_view; -/*! @copydoc as_view */ +/** + * @brief Deduction guide. + * @tparam Entity A valid entity type (see entt_traits for more details). + */ template -as_view(const basic_registry &) ENTT_NOEXCEPT -> as_view; +as_view(const basic_registry &) -> as_view; /** @@ -103,19 +102,18 @@ private: /** * @brief Deduction guide. - * - * It allows to deduce the constness of a registry directly from the instance - * provided to the constructor. - * * @tparam Entity A valid entity type (see entt_traits for more details). */ template -as_group(basic_registry &) ENTT_NOEXCEPT -> as_group; +as_group(basic_registry &) -> as_group; -/*! @copydoc as_group */ +/** + * @brief Deduction guide. + * @tparam Entity A valid entity type (see entt_traits for more details). + */ template -as_group(const basic_registry &) ENTT_NOEXCEPT -> as_group; +as_group(const basic_registry &) -> as_group; diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index 7e402c0d7..8f90d0e4e 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -956,7 +956,7 @@ private: * @param storage The storage for the types to iterate. */ template -basic_view(Storage &... storage) ENTT_NOEXCEPT +basic_view(Storage &... storage) -> basic_view, entt::exclude_t<>, constness_as_t...>; diff --git a/src/entt/signal/delegate.hpp b/src/entt/signal/delegate.hpp index ad44982ea..ccd8e6e92 100644 --- a/src/entt/signal/delegate.hpp +++ b/src/entt/signal/delegate.hpp @@ -335,7 +335,7 @@ template * @tparam Candidate Function or member to connect to the delegate. */ template -delegate(connect_arg_t) ENTT_NOEXCEPT +delegate(connect_arg_t) -> delegate>>; @@ -345,7 +345,7 @@ delegate(connect_arg_t) ENTT_NOEXCEPT * @tparam Type Type of class or type of payload. */ template -delegate(connect_arg_t, Type &&) ENTT_NOEXCEPT +delegate(connect_arg_t, Type &&) -> delegate>>; @@ -355,7 +355,7 @@ delegate(connect_arg_t, Type &&) ENTT_NOEXCEPT * @tparam Args Types of arguments of a function type. */ template -delegate(Ret(*)(const void *, Args...), const void * = nullptr) ENTT_NOEXCEPT +delegate(Ret(*)(const void *, Args...), const void * = nullptr) -> delegate; diff --git a/src/entt/signal/sigh.hpp b/src/entt/signal/sigh.hpp index 53a1e668e..bcece0c5f 100644 --- a/src/entt/signal/sigh.hpp +++ b/src/entt/signal/sigh.hpp @@ -510,7 +510,8 @@ private: * @tparam Args Types of arguments of a function type. */ template -sink(sigh &) ENTT_NOEXCEPT -> sink; +sink(sigh &) +-> sink; }