Просмотр исходного кода

signal: move connect_arg_t to fwd.hpp

Michele Caini 3 лет назад
Родитель
Сommit
0b6bbcc6a3
2 измененных файлов с 14 добавлено и 8 удалено
  1. 0 8
      src/entt/signal/delegate.hpp
  2. 14 0
      src/entt/signal/fwd.hpp

+ 0 - 8
src/entt/signal/delegate.hpp

@@ -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.
  *

+ 14 - 0
src/entt/signal/fwd.hpp

@@ -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