[libsigcplusplus] adaptor_trait: Remove unnecessary result_type.



commit 9e5877e4cb974d13a2a04140f8c3bfdeecbf76bb
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Apr 13 20:47:59 2016 +0200

    adaptor_trait: Remove unnecessary result_type.
    
    It was only used in adapts<>, but that can just use functor_trait<>
    instead. This leaves adaptor_trait doing one simple job: Either
    giving us the original functor or giving us a functor (mem_functor
    or ptr_functor) to wrap a bare C function.

 sigc++/adaptors/adaptor_trait.h |    2 --
 sigc++/adaptors/adapts.h        |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/sigc++/adaptors/adaptor_trait.h b/sigc++/adaptors/adaptor_trait.h
index 6992c21..90f9976 100644
--- a/sigc++/adaptors/adaptor_trait.h
+++ b/sigc++/adaptors/adaptor_trait.h
@@ -142,7 +142,6 @@ struct adaptor_trait;
 template <class T_functor>
 struct adaptor_trait<T_functor, true>
 {
-  using result_type = typename T_functor::result_type;
   using adaptor_type = T_functor;
 };
 
@@ -159,7 +158,6 @@ private:
   using functor_type = typename functor_trait<T_functor>::functor_type;
 
 public:
-  using result_type = typename functor_trait<T_functor>::result_type;
   using adaptor_type = adaptor_functor<functor_type>;
 };
 
diff --git a/sigc++/adaptors/adapts.h b/sigc++/adaptors/adapts.h
index 0003edc..4977c70 100644
--- a/sigc++/adaptors/adapts.h
+++ b/sigc++/adaptors/adapts.h
@@ -76,7 +76,7 @@ namespace sigc
 template <class T_functor>
 struct adapts : public adaptor_base
 {
-  using result_type = typename adaptor_trait<T_functor>::result_type;
+  using result_type = typename functor_trait<T_functor>::result_type;
   using adaptor_type = typename adaptor_trait<T_functor>::adaptor_type;
 
   /** Constructs an adaptor that wraps the passed functor.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]