[libsigcplusplus] adapts, typed_slot_rep: Make adaptor_type aliases private.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] adapts, typed_slot_rep: Make adaptor_type aliases private.
- Date: Wed, 13 Apr 2016 20:41:44 +0000 (UTC)
commit a018cb24d44c8ff4fd732a4bd0ea05cffb37d950
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Apr 13 22:40:10 2016 +0200
adapts, typed_slot_rep: Make adaptor_type aliases private.
They are used in public API, but that is legal C++.
This way, we don't need to think that the public types are needed.
sigc++/adaptors/adapts.h | 2 ++
sigc++/functors/slot.h | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/sigc++/adaptors/adapts.h b/sigc++/adaptors/adapts.h
index a88461d..956b4b4 100644
--- a/sigc++/adaptors/adapts.h
+++ b/sigc++/adaptors/adapts.h
@@ -75,8 +75,10 @@ namespace sigc
template <class T_functor>
struct adapts : public adaptor_base
{
+private:
using adaptor_type = typename adaptor_trait<T_functor>::adaptor_type;
+public:
/** Constructs an adaptor that wraps the passed functor.
* @param _A_functor Functor to invoke from operator()().
*/
diff --git a/sigc++/functors/slot.h b/sigc++/functors/slot.h
index 4dacb87..ca1a211 100644
--- a/sigc++/functors/slot.h
+++ b/sigc++/functors/slot.h
@@ -25,10 +25,10 @@ struct typed_slot_rep : public slot_rep
private:
using self = typed_slot_rep<T_functor>;
-public:
/* Use an adaptor type so that arguments can be passed as const references
* through explicit template instantiation from slot_call#::call_it() */
using adaptor_type = typename adaptor_trait<T_functor>::adaptor_type;
+public:
/** The functor contained by this slot_rep object. */
adaptor_type functor_;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]