[libsigc++2/variadic] Remove the SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD ifndefs.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigc++2/variadic] Remove the SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD ifndefs.
- Date: Thu, 14 Jan 2016 12:06:11 +0000 (UTC)
commit 118e382209578649f5043dc9f90c5538e06486c8
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Jan 14 13:05:01 2016 +0100
Remove the SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD ifndefs.
These were mostly for the Sun Forte (now Sun Studio) compiler.
There is a good chance that these are no longer necessary with more
recent compiler versions, and if not, this is one way to find out.
They have duplicated code that makes porting to variadic templates
awkward.
sigc++/adaptors/adaptor_trait.h | 17 -----------------
sigc++/adaptors/bind_return.h | 9 ---------
sigc++/adaptors/macros/bind.h.m4 | 18 ------------------
sigc++/adaptors/macros/hide.h.m4 | 23 -----------------------
sigc++/adaptors/macros/retype.h.m4 | 9 ---------
sigc++/adaptors/macros/track_obj.h.m4 | 11 -----------
sigc++/adaptors/retype_return.h | 18 ------------------
7 files changed, 0 insertions(+), 105 deletions(-)
---
diff --git a/sigc++/adaptors/adaptor_trait.h b/sigc++/adaptors/adaptor_trait.h
index f76de9c..8c46ffb 100644
--- a/sigc++/adaptors/adaptor_trait.h
+++ b/sigc++/adaptors/adaptor_trait.h
@@ -37,11 +37,9 @@ namespace sigc {
// depending on the compiler:
#ifdef SIGC_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
#define SIGC_WORKAROUND_OPERATOR_PARENTHESES template operator()
- #define SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
#else
#ifdef SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
#define SIGC_WORKAROUND_OPERATOR_PARENTHESES operator()
- #define SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
#else
#define SIGC_WORKAROUND_OPERATOR_PARENTHESES sun_forte_workaround
#endif
@@ -91,11 +89,6 @@ struct adaptor_functor : public adaptor_base
result_type
operator()() const;
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- result_type sun_forte_workaround() const
- { return operator(); }
- #endif
-
/** Invokes the wrapped functor passing on the arguments.
* @param _A_arg... Arguments to be passed on to the functor.
@@ -106,16 +99,6 @@ struct adaptor_functor : public adaptor_base
operator()(T_arg... _A_arg) const
{ return functor_(_A_arg...); }
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <class... T_arg>
- decltype(auto)
- sun_forte_workaround(T_arg... _A_arg) const
- { //Just calling operator() tries to copy the argument:
- return functor_(_A_arg...);
- }
- #endif
-
-
/// Constructs an invalid functor.
adaptor_functor()
{}
diff --git a/sigc++/adaptors/bind_return.h b/sigc++/adaptors/bind_return.h
index 2e2b399..e6b129e 100644
--- a/sigc++/adaptors/bind_return.h
+++ b/sigc++/adaptors/bind_return.h
@@ -35,15 +35,6 @@ struct bind_return_functor : public adapts<T_functor>
(_A_a...); return ret_value_.invoke();
}
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <class... T_arg>
- inline typename unwrap_reference<T_return>::type sun_forte_workaround(T_arg... _A_a)
- { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg>...>
- (_A_a...); return ret_value_.invoke();
- }
- #endif
-
-
/** Constructs a bind_return_functor object that fixes the return value to @p _A_ret_value.
* @param _A_functor Functor to invoke from operator()().
* @param _A_ret_value Value to return from operator()().
diff --git a/sigc++/adaptors/macros/bind.h.m4 b/sigc++/adaptors/macros/bind.h.m4
index 61b4f83..0a7bfd6 100644
--- a/sigc++/adaptors/macros/bind.h.m4
+++ b/sigc++/adaptors/macros/bind.h.m4
@@ -37,15 +37,6 @@ FOR(1, eval($2-1),[
(LIST(LOOP(_A_arg%1,eval($1-1)), bound_.invoke(), FOR($1,eval($2-1),[_A_arg%1,])));
}
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <LOOP([class T_arg%1], eval($2-1))>
- decltype(auto)
- sun_forte_workaround(LOOP(T_arg%1 _A_arg%1,eval($2-1)))
- { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<LIST(LOOP([type_trait_pass_t<T_arg%1>],
eval($1-1)), type_trait_take_t<typename unwrap_reference<T_bound>::type>,
FOR($1,eval($2-1),[type_trait_take_t<T_arg%1>,]))>
- (LIST(LOOP(_A_arg%1,eval($1-1)), bound_.invoke(), FOR($1,eval($2-1),[_A_arg%1,])));
- }
- #endif
-
])dnl
])
define([BIND_OPERATOR_COUNT],[dnl
@@ -62,15 +53,6 @@ FOR(1, eval($2-1),[
(LIST(LOOP(_A_arg%1,eval($2-1)), LOOP(bound%1_.invoke(), $1)));
}
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <LOOP([class T_arg%1], eval($2-1))>
- decltype(auto)
- sun_forte_workaround(LOOP(T_arg%1 _A_arg%1, eval($2-1)))
- { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<LIST(LOOP([type_trait_pass_t<T_arg%1>],
eval($2-1)), LOOP(type_trait_take_t<typename unwrap_reference<T_type%1>::type>, $1))>
- (LIST(LOOP(_A_arg%1,eval($2-1)), LOOP(bound%1_.invoke(), $1)));
- }
- #endif
-
])
define([BIND_FUNCTOR_LOCATION],[dnl
ifelse($1,1,[#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/sigc++/adaptors/macros/hide.h.m4 b/sigc++/adaptors/macros/hide.h.m4
index c4140dc..0714c7a 100644
--- a/sigc++/adaptors/macros/hide.h.m4
+++ b/sigc++/adaptors/macros/hide.h.m4
@@ -34,13 +34,6 @@ ifelse($2,1,[dnl
operator()(T_arg1)
{ return this->functor_(); }
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <class T_arg1>
- decltype(auto)
- sun_forte_workaround(T_arg1 _A_a1)
- { return this->functor_(); }
- #endif
-
],$1,0,[dnl
/** Invokes the wrapped functor, ignoring the last argument.dnl
FOR(1, eval($2-1),[
@@ -54,14 +47,6 @@ FOR(1, eval($2-1),[
{ return
this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<LIST(FOR(1,eval($2-1),[type_trait_pass_t<T_arg%1>,]))>
(LIST(FOR(1,eval($2-1),[_A_a%1,]))); }
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <LOOP([class T_arg%1], $2)>
- decltype(auto)
- sun_forte_workaround(LOOP(T_arg%1 _A_a%1, eval($2-1)), T_arg$2)
- { return
this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<LIST(FOR(1,eval($2-1),[type_trait_pass_t<T_arg%1>,]))>
- (LIST(FOR(1,eval($2-1),[_A_a%1,]))); }
- #endif
-
],[dnl
/** Invokes the wrapped functor, ignoring the ORDINAL($1) argument.dnl
FOR(1, eval($1-1),[
@@ -77,14 +62,6 @@ FOR(eval($1+1), $2,[
{ return
this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<LIST(FOR(1,eval($1-1),[type_trait_pass_t<T_arg%1>,]),FOR(eval($1+1),
$2,[type_trait_pass_t<T_arg%1>,]))>
(LIST(FOR(1,eval($1-1),[_A_a%1,]),FOR(eval($1+1),$2,[_A_a%1,]))); }
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <LOOP([class T_arg%1], $2)>
- decltype(auto)
- sun_forte_workaround(LIST(FOR(1,eval($1-1),[T_arg%1 _A_a%1,]),T_arg$1,FOR(eval($1+1),$2,[T_arg%1
_A_a%1,])))
- { return
this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<LIST(FOR(1,eval($1-1),[type_trait_pass_t<T_arg%1>,]),FOR(eval($1+1),
$2,[type_trait_pass_t<T_arg%1>,]))>
- (LIST(FOR(1,eval($1-1),[_A_a%1,]),FOR(eval($1+1),$2,[_A_a%1,]))); }
- #endif
-
])])dnl
])dnl end HIDE_OPERATOR
diff --git a/sigc++/adaptors/macros/retype.h.m4 b/sigc++/adaptors/macros/retype.h.m4
index 4cc5d03..e2b84a5 100644
--- a/sigc++/adaptors/macros/retype.h.m4
+++ b/sigc++/adaptors/macros/retype.h.m4
@@ -30,15 +30,6 @@ ifelse($1,0,[dnl
(LOOP([[static_cast<T_type%1>(_A_a%1)]], $1));
}
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <LOOP(class T_arg%1, $1)>
- decltype(auto)
- sun_forte_workaround(LOOP(T_arg%1 _A_a%1, $1))
- { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<LOOP(type_trait_take_t<T_type%1>, $1)>
- (LOOP([[static_cast<T_type%1>(_A_a%1)]], $1));
- }
- #endif
-
])dnl
])
diff --git a/sigc++/adaptors/macros/track_obj.h.m4 b/sigc++/adaptors/macros/track_obj.h.m4
index 0f8474b..971b701 100644
--- a/sigc++/adaptors/macros/track_obj.h.m4
+++ b/sigc++/adaptors/macros/track_obj.h.m4
@@ -183,17 +183,6 @@ public:
(_A_arg...);
}
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <typename... T_arg>
- decltype(auto)
- sun_forte_workaround(T_arg... _A_arg)
- {
- return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_pass_t<T_arg>...>
- (_A_arg...);
- }
- #endif
-
-
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//protected:
// public, so that visit_each() can access it.
diff --git a/sigc++/adaptors/retype_return.h b/sigc++/adaptors/retype_return.h
index 4555bf4..56c0ac5 100644
--- a/sigc++/adaptors/retype_return.h
+++ b/sigc++/adaptors/retype_return.h
@@ -27,15 +27,6 @@ struct retype_return_functor : public adapts<T_functor>
(_A_a...));
}
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <class... T_arg>
- inline T_return sun_forte_workaround(T_arg... _A_a)
- { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<T_arg...>
- (_A_a...));
- }
- #endif
-
-
retype_return_functor() {}
/** Constructs a retype_return_functor object that perform a C-style cast on the return value of the
passed functor.
@@ -73,15 +64,6 @@ struct retype_return_functor<void, T_functor> : public adapts<T_functor>
(_A_a...);
}
- #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
- template <class... T_arg>
- inline void sun_forte_workaround(T_arg... _A_a)
- { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<T_arg...>
- (_A_a...);
- }
- #endif
-
-
retype_return_functor() {}
retype_return_functor(type_trait_take_t<T_functor> _A_functor)
: adapts<T_functor>(_A_functor)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]