[libsigcplusplus] Make unused adaptor_type aliases private.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] Make unused adaptor_type aliases private.
- Date: Wed, 13 Apr 2016 18:27:54 +0000 (UTC)
commit bb0eb47eceba50f6db06420834ec701b56a1add6
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Apr 13 13:25:50 2016 +0200
Make unused adaptor_type aliases private.
sigc++/adaptors/bind.h | 6 ++++++
sigc++/adaptors/compose.h | 6 ++++++
sigc++/adaptors/exception_catch.h | 9 ++++++++-
sigc++/adaptors/hide.h | 3 +++
sigc++/adaptors/retype.h | 3 +++
sigc++/adaptors/track_obj.h | 4 +++-
6 files changed, 29 insertions(+), 2 deletions(-)
---
diff --git a/sigc++/adaptors/bind.h b/sigc++/adaptors/bind.h
index d92065c..fcca3fd 100644
--- a/sigc++/adaptors/bind.h
+++ b/sigc++/adaptors/bind.h
@@ -107,7 +107,10 @@ struct TransformEachInvoker
template <int I_location, class T_functor, class... T_bound>
struct bind_functor : public adapts<T_functor>
{
+private:
using adaptor_type = typename adapts<T_functor>::adaptor_type;
+
+public:
using result_type = typename adaptor_type::result_type;
/** Invokes the wrapped functor passing on the arguments.
@@ -167,7 +170,10 @@ private:
template <class T_functor, class... T_type>
struct bind_functor<-1, T_functor, T_type...> : public adapts<T_functor>
{
+private:
using adaptor_type = typename adapts<T_functor>::adaptor_type;
+
+public:
using result_type = typename adaptor_type::result_type;
/** Invokes the wrapped functor passing on the arguments.
diff --git a/sigc++/adaptors/compose.h b/sigc++/adaptors/compose.h
index 9d9050c..9a6c3e6 100644
--- a/sigc++/adaptors/compose.h
+++ b/sigc++/adaptors/compose.h
@@ -43,7 +43,10 @@ namespace sigc
template <class T_setter, class T_getter>
struct compose1_functor : public adapts<T_setter>
{
+private:
using adaptor_type = typename adapts<T_setter>::adaptor_type;
+
+public:
using setter_type = T_setter;
using getter_type = T_getter;
using result_type = typename adaptor_type::result_type;
@@ -82,7 +85,10 @@ struct compose1_functor : public adapts<T_setter>
template <class T_setter, class T_getter1, class T_getter2>
struct compose2_functor : public adapts<T_setter>
{
+private:
using adaptor_type = typename adapts<T_setter>::adaptor_type;
+
+public:
using setter_type = T_setter;
using getter1_type = T_getter1;
using getter2_type = T_getter2;
diff --git a/sigc++/adaptors/exception_catch.h b/sigc++/adaptors/exception_catch.h
index 4f8b76c..89f3b1b 100644
--- a/sigc++/adaptors/exception_catch.h
+++ b/sigc++/adaptors/exception_catch.h
@@ -59,7 +59,10 @@ template <class T_functor, class T_catcher,
class T_return = typename adapts<T_functor>::result_type>
struct exception_catch_functor : public adapts<T_functor>
{
+private:
using adaptor_type = typename adapts<T_functor>::adaptor_type;
+
+public:
using result_type = T_return;
decltype(auto) operator()()
@@ -99,9 +102,13 @@ struct exception_catch_functor : public adapts<T_functor>
template <class T_functor, class T_catcher>
struct exception_catch_functor<T_functor, T_catcher, void> : public adapts<T_functor>
{
- using result_type = void;
+private:
using adaptor_type = typename adapts<T_functor>::adaptor_type;
+public:
+ using result_type = void;
+
+
template <class... T_arg>
decltype(auto) operator()(T_arg... _A_a)
{
diff --git a/sigc++/adaptors/hide.h b/sigc++/adaptors/hide.h
index f31b46d..0628c7c 100644
--- a/sigc++/adaptors/hide.h
+++ b/sigc++/adaptors/hide.h
@@ -69,7 +69,10 @@ namespace sigc
template <int I_location, class T_functor>
struct hide_functor : public adapts<T_functor>
{
+private:
using adaptor_type = typename adapts<T_functor>::adaptor_type;
+
+public:
using result_type = typename adaptor_type::result_type;
/** Invokes the wrapped functor, ignoring the argument at index @e I_location (0-indexed).
diff --git a/sigc++/adaptors/retype.h b/sigc++/adaptors/retype.h
index 92c381e..98c2c24 100644
--- a/sigc++/adaptors/retype.h
+++ b/sigc++/adaptors/retype.h
@@ -61,7 +61,10 @@ namespace sigc
template <class T_functor, class... T_type>
struct retype_functor : public adapts<T_functor>
{
+private:
using adaptor_type = typename adapts<T_functor>::adaptor_type;
+
+public:
using result_type = typename adapts<T_functor>::result_type;
template <class... T_arg>
diff --git a/sigc++/adaptors/track_obj.h b/sigc++/adaptors/track_obj.h
index e513254..6b138f4 100644
--- a/sigc++/adaptors/track_obj.h
+++ b/sigc++/adaptors/track_obj.h
@@ -51,8 +51,10 @@ namespace sigc
template <typename T_functor, typename... T_obj>
class track_obj_functor : public adapts<T_functor>
{
-public:
+private:
using adaptor_type = typename adapts<T_functor>::adaptor_type;
+
+public:
using result_type = typename adaptor_type::result_type;
/** Constructs a track_obj_functor object that wraps the passed functor and
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]