signal: move connect_arg_t to fwd.hpp

This commit is contained in:
Michele Caini
2022-10-07 12:24:11 +02:00
parent 5fac237153
commit 0b6bbcc6a3
2 changed files with 14 additions and 8 deletions

View File

@@ -49,14 +49,6 @@ template<typename... Class, typename Ret, typename... Args>
* @endcond
*/
/*! @brief Used to wrap a function or a member of a specified type. */
template<auto>
struct connect_arg_t {};
/*! @brief Constant of type connect_arg_t used to disambiguate calls. */
template<auto Func>
inline constexpr connect_arg_t<Func> connect_arg{};
/**
* @brief Basic delegate implementation.
*

View File

@@ -27,6 +27,20 @@ class sigh;
/*! @brief Alias declaration for the most common use case. */
using dispatcher = basic_dispatcher<>;
/*! @brief Used to wrap a function or a member of a specified type. */
template<auto>
struct connect_arg_t {
/*! @brief Default constructor. */
explicit connect_arg_t() = default;
};
/**
* @brief Constant of type connect_arg_t used to disambiguate calls.
* @tparam Candidate Element to connect (likely a free or member function).
*/
template<auto Candidate>
inline constexpr connect_arg_t<Candidate> connect_arg{};
} // namespace entt
#endif