[libsigc++2/variadic] C++14 Remove now-unused deduce_result_t.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigc++2/variadic] C++14 Remove now-unused deduce_result_t.
- Date: Fri, 8 Jan 2016 10:58:44 +0000 (UTC)
commit f2a4c5eb03c56913050e5ffde88772d0aa4522d3
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Jan 8 11:58:12 2016 +0100
C++14 Remove now-unused deduce_result_t.
sigc++/adaptors/deduce_result_type.h | 46 +--------------------------------
1 files changed, 2 insertions(+), 44 deletions(-)
---
diff --git a/sigc++/adaptors/deduce_result_type.h b/sigc++/adaptors/deduce_result_type.h
index 9717a7a..97b6f68 100644
--- a/sigc++/adaptors/deduce_result_type.h
+++ b/sigc++/adaptors/deduce_result_type.h
@@ -4,11 +4,10 @@
namespace sigc {
+//TODO: Is this necessary now that we don't need deduce_result_type?
/** A hint to the compiler.
* Functors which have all methods based on templates
- * should publicly inherit from this hint and define
- * a nested template class @p deduce_result_type that
- * can be used to deduce the methods' return types.
+ * should publicly inherit from this hint.
*
* adaptor_base inherits from the functor_base hint so
* derived types should also have a result_type defined.
@@ -22,46 +21,5 @@ namespace sigc {
*/
struct adaptor_base : public functor_base {};
-
-/** Deduce the return type of a functor.
- * <tt>typename deduce_result_type<functor_type, list of arg_types>::type</tt>
- * deduces a functor's result type if @p functor_type inherits from
- * sigc::functor_base and defines @p result_type or if @p functor_type
- * is actually a (member) function type. Multi-type functors are not
- * supported.
- *
- * sigc++ adaptors use
- * <tt>typename deduce_result_type<functor_type, list of arg_types>::type</tt>
- * to determine the return type of their <tt>templated operator()</tt> overloads.
- *
- * Adaptors in turn define a nested template class @p deduce_result_type
- * that is used by template specializations of the global deduce_result_type
- * template to correctly deduce the return types of the adaptor's suitable
- * <tt>template operator()</tt> overload.
- *
- * @ingroup adaptors
- */
-template<class T_functor, class... T_args>
-struct deduce_result_type
-{
- //The compiler will choose this method overload if T_functor derives from adaptor_base,
- //and if it has its own deduce_result_type member (which has its own ::type member).
- template<class U_functor, typename = typename std::is_base_of<adaptor_base, T_functor>::type>
- static
- typename U_functor::template deduce_result_type<T_args...>::type
- test();
-
- //Otherwise, the compiler will choose this fallback method.
- template<class U_functor>
- static
- typename functor_trait<T_functor>::result_type
- test();
-
- using type = decltype (test<T_functor> ());
-};
-
-template<typename T_functor, typename... T_args>
-using deduce_result_t = typename deduce_result_type<T_functor, T_args...>::type;
-
} /* namespace sigc */
#endif /* _SIGC_ADAPTORS_DEDUCE_RESULT_TYPE_H_ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]