[libsigcplusplus] Use typename instead of class for all template parameters.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] Use typename instead of class for all template parameters.
- Date: Tue, 19 Apr 2016 11:49:18 +0000 (UTC)
commit f19a492808d724a0f73e83fdf76ba7aa2aa3338c
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Apr 19 13:47:18 2016 +0200
Use typename instead of class for all template parameters.
Apart from template template parameters, which must still be class
according to the C++14 standard:
http://stackoverflow.com/a/11311432/1123654
though g++ and clang++ actually already supporting using typename
instead by implementing N4051:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4051.html
sigc++/adaptors/adaptor_trait.h | 16 ++++----
sigc++/adaptors/adapts.h | 12 +++---
sigc++/adaptors/bind.h | 22 +++++-----
sigc++/adaptors/bind_return.h | 12 +++---
sigc++/adaptors/bound_argument.h | 10 ++--
sigc++/adaptors/compose.h | 20 ++++----
sigc++/adaptors/exception_catch.h | 8 ++--
sigc++/adaptors/hide.h | 12 +++---
sigc++/adaptors/retype.h | 10 ++--
sigc++/adaptors/retype_return.h | 18 ++++----
sigc++/functors/functor_trait.h | 8 ++--
sigc++/functors/mem_fun.h | 24 +++++-----
sigc++/functors/ptr_fun.h | 6 +-
sigc++/functors/slot.h | 10 ++--
sigc++/limit_reference.h | 8 ++--
sigc++/member_method_trait.h | 40 +++++++++---------
sigc++/reference_wrapper.h | 10 ++--
sigc++/signal.h | 24 +++++-----
sigc++/tuple-utils/tuple_transform_each.h | 2 +-
sigc++/type_traits.h | 8 ++--
sigc++/visit_each.h | 22 +++++-----
tests/test_accum_iter.cc | 2 +-
tests/test_accumulated.cc | 2 +-
tests/test_bind_refptr.cc | 66 ++++++++++++++--------------
tests/test_tuple_for_each.cc | 12 +++---
tests/test_tuple_transform_each.cc | 12 +++---
tests/test_visit_each.cc | 14 +++---
tests/test_visit_each_trackable.cc | 8 ++--
28 files changed, 209 insertions(+), 209 deletions(-)
---
diff --git a/sigc++/adaptors/adaptor_trait.h b/sigc++/adaptors/adaptor_trait.h
index df56b29..120d371 100644
--- a/sigc++/adaptors/adaptor_trait.h
+++ b/sigc++/adaptors/adaptor_trait.h
@@ -62,7 +62,7 @@ namespace sigc
*
* @ingroup adaptors
*/
-template <class T_functor>
+template <typename T_functor>
struct adaptor_functor : public adaptor_base
{
/** Invokes the wrapped functor passing on the arguments.
@@ -74,7 +74,7 @@ struct adaptor_functor : public adaptor_base
* @param _A_arg... Arguments to be passed on to the functor.
* @return The return value of the functor invocation.
*/
- template <class... T_arg>
+ template <typename... T_arg>
decltype(auto) operator()(T_arg&&... _A_arg) const
{
return functor_(std::forward<T_arg>(_A_arg)...);
@@ -92,7 +92,7 @@ struct adaptor_functor : public adaptor_base
* function pointer.
* @param _A_type Pointer to function or class method to invoke from operator()().
*/
- template <class T_type>
+ template <typename T_type>
explicit adaptor_functor(const T_type& _A_type) : functor_(_A_type)
{
}
@@ -109,10 +109,10 @@ struct adaptor_functor : public adaptor_base
*
* @ingroup adaptors
*/
-template <class T_functor>
+template <typename T_functor>
struct visitor<adaptor_functor<T_functor>>
{
- template <class T_action>
+ template <typename T_action>
static void do_visit_each(const T_action& _A_action, const adaptor_functor<T_functor>& _A_target)
{
sigc::visit_each(_A_action, _A_target.functor_);
@@ -129,7 +129,7 @@ struct visitor<adaptor_functor<T_functor>>
*
* @ingroup adaptors
*/
-template <class T_functor, bool I_isadaptor = std::is_base_of<adaptor_base, T_functor>::value>
+template <typename T_functor, bool I_isadaptor = std::is_base_of<adaptor_base, T_functor>::value>
struct adaptor_trait;
@@ -137,7 +137,7 @@ struct adaptor_trait;
* This template specialization is used for types that inherit from adaptor_base.
* adaptor_type is equal to @p T_functor in this case.
*/
-template <class T_functor>
+template <typename T_functor>
struct adaptor_trait<T_functor, true>
{
using adaptor_type = T_functor;
@@ -149,7 +149,7 @@ struct adaptor_trait<T_functor, true>
* The latter are converted into @p pointer_functor or @p mem_functor types.
* adaptor_type is equal to @p adaptor_functor<functor_type>.
*/
-template <class T_functor>
+template <typename T_functor>
struct adaptor_trait<T_functor, false>
{
private:
diff --git a/sigc++/adaptors/adapts.h b/sigc++/adaptors/adapts.h
index 956b4b4..46e40ea 100644
--- a/sigc++/adaptors/adapts.h
+++ b/sigc++/adaptors/adapts.h
@@ -24,18 +24,18 @@ namespace sigc
* @code
* namespace my_ns
* {
- * template <class T_functor>
+ * template <typename T_functor>
* struct my_adaptor : public sigc::adapts<T_functor>
* {
* //
* decltype(auto)
* operator()() const;
* //
- * template <class T_arg1>
+ * template <typename T_arg1>
* decltype(auto)
* operator()(T_arg1 _A_arg1) const;
* //
- * template <class T_arg1, class T_arg2>
+ * template <typename T_arg1, typename T_arg2>
* decltype(auto)
* operator()(T_arg1 _A_arg1, T_arg2 _A_arg2) const;
* //
@@ -49,10 +49,10 @@ namespace sigc
* // Specialization of sigc::visitor for my_adaptor.
* namespace sigc
* {
- * template <class T_functor>
+ * template <typename T_functor>
* struct visitor<my_ns::my_adaptor<T_functor> >
* {
- * template <class T_action>
+ * template <typename T_action>
* static void do_visit_each(const T_action& _A_action,
* const my_ns::my_adaptor<T_functor>& _A_target)
* {
@@ -72,7 +72,7 @@ namespace sigc
*
* @ingroup adaptors
*/
-template <class T_functor>
+template <typename T_functor>
struct adapts : public adaptor_base
{
private:
diff --git a/sigc++/adaptors/bind.h b/sigc++/adaptors/bind.h
index 7e4347a..d0e1f6a 100644
--- a/sigc++/adaptors/bind.h
+++ b/sigc++/adaptors/bind.h
@@ -85,7 +85,7 @@ namespace sigc
namespace internal
{
-template <class T_element>
+template <typename T_element>
struct TransformEachInvoker
{
// We take T_element as non-const because invoke() is not const.
@@ -105,7 +105,7 @@ struct TransformEachInvoker
*
* @ingroup bind
*/
-template <int I_location, class T_functor, origin::Copy_constructible... T_bound>
+template <int I_location, typename T_functor, origin::Copy_constructible... T_bound>
struct bind_functor : public adapts<T_functor>
{
/** Invokes the wrapped functor passing on the arguments.
@@ -113,7 +113,7 @@ struct bind_functor : public adapts<T_functor>
* @param _A_arg Arguments to be passed on to the functor.
* @return The return value of the functor invocation.
*/
- template <class... T_arg>
+ template <typename... T_arg>
decltype(auto) operator()(T_arg&&... _A_arg)
{
// For instance, if I_location is 1, and _A_arg has 4 arguments,
@@ -150,7 +150,7 @@ private:
/// The arguments bound to the functor.
std::tuple<bound_argument<T_bound>...> bound_;
- template <class T, std::size_t... Is>
+ template <typename T, std::size_t... Is>
decltype(auto) call_functor_operator_parentheses(T&& tuple, std::index_sequence<Is...>)
{
return (this->functor_)(std::get<Is>(std::forward<T>(tuple))...);
@@ -162,7 +162,7 @@ private:
*
* @ingroup bind
*/
-template <class T_functor, class... T_type>
+template <typename T_functor, typename... T_type>
struct bind_functor<-1, T_functor, T_type...> : public adapts<T_functor>
{
public:
@@ -198,7 +198,7 @@ public:
std::tuple<bound_argument<T_type>...> bound_;
private:
- template <class T, std::size_t... Is>
+ template <typename T, std::size_t... Is>
decltype(auto) call_functor_operator_parentheses(T&& tuple, std::index_sequence<Is...>)
{
return (this->functor_)(std::get<Is>(std::forward<T>(tuple))...);
@@ -213,10 +213,10 @@ private:
*
* @ingroup bind
*/
-template <int T_loc, class T_functor, origin::Copy_constructible... T_bound>
+template <int T_loc, typename T_functor, origin::Copy_constructible... T_bound>
struct visitor<bind_functor<T_loc, T_functor, T_bound...>>
{
- template <class T_action>
+ template <typename T_action>
static void do_visit_each(
const T_action& _A_action, const bind_functor<T_loc, T_functor, T_bound...>& _A_target)
{
@@ -232,7 +232,7 @@ struct visitor<bind_functor<T_loc, T_functor, T_bound...>>
*
* @ingroup bind
*/
-template <class T_functor, origin::Copy_constructible... T_type>
+template <typename T_functor, origin::Copy_constructible... T_type>
struct visitor<bind_functor<-1, T_functor, T_type...>>
{
template <typename T_action>
@@ -258,7 +258,7 @@ struct visitor<bind_functor<-1, T_functor, T_type...>>
*
* @ingroup bind
*/
-template <int I_location, class T_functor, origin::Copy_constructible... T_bound>
+template <int I_location, typename T_functor, origin::Copy_constructible... T_bound>
inline decltype(auto)
bind(const T_functor& _A_func, T_bound... _A_b)
{
@@ -275,7 +275,7 @@ bind(const T_functor& _A_func, T_bound... _A_b)
*
* @ingroup bind
*/
-template <class T_functor, origin::Copy_constructible... T_type>
+template <typename T_functor, origin::Copy_constructible... T_type>
inline decltype(auto)
bind(const T_functor& _A_func, T_type... _A_b)
{
diff --git a/sigc++/adaptors/bind_return.h b/sigc++/adaptors/bind_return.h
index 47296bc..b0a5a05 100644
--- a/sigc++/adaptors/bind_return.h
+++ b/sigc++/adaptors/bind_return.h
@@ -16,7 +16,7 @@ namespace sigc
*
* @ingroup bind
*/
-template <class T_return, class T_functor>
+template <typename T_return, typename T_functor>
struct bind_return_functor : public adapts<T_functor>
{
/** Invokes the wrapped functor dropping its return value.
@@ -28,7 +28,7 @@ struct bind_return_functor : public adapts<T_functor>
* @param _A_a... Arguments to be passed on to the functor.
* @return The fixed return value.
*/
- template <class... T_arg>
+ template <typename... T_arg>
inline typename unwrap_reference<T_return>::type operator()(T_arg... _A_a)
{
this->functor_.template operator()<type_trait_pass_t<T_arg>...>(_A_a...);
@@ -49,7 +49,7 @@ struct bind_return_functor : public adapts<T_functor>
bound_argument<T_return> ret_value_; // public, so that visit_each() can access it
};
-template <class T_return, class T_functor>
+template <typename T_return, typename T_functor>
typename unwrap_reference<T_return>::type
bind_return_functor<T_return, T_functor>::operator()()
{
@@ -65,10 +65,10 @@ bind_return_functor<T_return, T_functor>::operator()()
*
* @ingroup bind
*/
-template <class T_return, class T_functor>
+template <typename T_return, typename T_functor>
struct visitor<bind_return_functor<T_return, T_functor>>
{
- template <class T_action>
+ template <typename T_action>
static void do_visit_each(
const T_action& _A_action, const bind_return_functor<T_return, T_functor>& _A_target)
{
@@ -87,7 +87,7 @@ struct visitor<bind_return_functor<T_return, T_functor>>
*
* @ingroup bind
*/
-template <class T_return, class T_functor>
+template <typename T_return, typename T_functor>
inline bind_return_functor<T_return, T_functor>
bind_return(const T_functor& _A_functor, T_return _A_ret_value)
{
diff --git a/sigc++/adaptors/bound_argument.h b/sigc++/adaptors/bound_argument.h
index aacf388..f37f936 100644
--- a/sigc++/adaptors/bound_argument.h
+++ b/sigc++/adaptors/bound_argument.h
@@ -46,7 +46,7 @@ namespace sigc
* The general template implementation is used for parameters that are passed by value.
* @e T_type The type of the bound argument.
*/
-template <class T_type>
+template <typename T_type>
class bound_argument
{
public:
@@ -76,7 +76,7 @@ private:
* returned by bind_return() by reference, specialized for std::reference_wrapper<> types.
* @e T_wrapped The type of the bound argument.
*/
-template <class T_wrapped>
+template <typename T_wrapped>
class bound_argument<std::reference_wrapper<T_wrapped>>
{
public:
@@ -108,7 +108,7 @@ private:
* returned by bind_return() by const reference, specialized for const reference_wrapper<> types.
* - @e T_wrapped The type of the bound argument.
*/
-template <class T_wrapped>
+template <typename T_wrapped>
class bound_argument<std::reference_wrapper<const T_wrapped>>
{
public:
@@ -145,10 +145,10 @@ private:
* @param _A_action The functor to invoke.
* @param _A_argument The visited instance.
*/
-template <class T_type>
+template <typename T_type>
struct visitor<bound_argument<T_type>>
{
- template <class T_action>
+ template <typename T_action>
static void do_visit_each(const T_action& _A_action, const bound_argument<T_type>& _A_argument)
{
sigc::visit_each(_A_action, _A_argument.visit());
diff --git a/sigc++/adaptors/compose.h b/sigc++/adaptors/compose.h
index c261b7b..0940c21 100644
--- a/sigc++/adaptors/compose.h
+++ b/sigc++/adaptors/compose.h
@@ -40,12 +40,12 @@ namespace sigc
*
* @ingroup compose
*/
-template <class T_setter, class T_getter>
+template <typename T_setter, typename T_getter>
struct compose1_functor : public adapts<T_setter>
{
decltype(auto) operator()() { return this->functor_(get_()); }
- template <class... T_arg>
+ template <typename... T_arg>
decltype(auto) operator()(T_arg&&... _A_a)
{
return this->functor_(get_(std::forward<T_arg>(_A_a)...));
@@ -74,12 +74,12 @@ struct compose1_functor : public adapts<T_setter>
*
* @ingroup compose
*/
-template <class T_setter, class T_getter1, class T_getter2>
+template <typename T_setter, typename T_getter1, typename T_getter2>
struct compose2_functor : public adapts<T_setter>
{
decltype(auto) operator()() { return this->functor_(get1_(), get2_()); }
- template <class... T_arg>
+ template <typename... T_arg>
decltype(auto) operator()(T_arg... _A_a)
{
return this->functor_(get1_(_A_a...), get2_(_A_a...));
@@ -109,10 +109,10 @@ struct compose2_functor : public adapts<T_setter>
*
* @ingroup compose
*/
-template <class T_setter, class T_getter>
+template <typename T_setter, typename T_getter>
struct visitor<compose1_functor<T_setter, T_getter>>
{
- template <class T_action>
+ template <typename T_action>
static void do_visit_each(
const T_action& _A_action, const compose1_functor<T_setter, T_getter>& _A_target)
{
@@ -128,10 +128,10 @@ struct visitor<compose1_functor<T_setter, T_getter>>
*
* @ingroup compose
*/
-template <class T_setter, class T_getter1, class T_getter2>
+template <typename T_setter, typename T_getter1, typename T_getter2>
struct visitor<compose2_functor<T_setter, T_getter1, T_getter2>>
{
- template <class T_action>
+ template <typename T_action>
static void do_visit_each(
const T_action& _A_action, const compose2_functor<T_setter, T_getter1, T_getter2>& _A_target)
{
@@ -151,7 +151,7 @@ struct visitor<compose2_functor<T_setter, T_getter1, T_getter2>>
*
* @ingroup compose
*/
-template <class T_setter, class T_getter>
+template <typename T_setter, typename T_getter>
inline compose1_functor<T_setter, T_getter>
compose(const T_setter& _A_setter, const T_getter& _A_getter)
{
@@ -169,7 +169,7 @@ compose(const T_setter& _A_setter, const T_getter& _A_getter)
*
* @ingroup compose
*/
-template <class T_setter, class T_getter1, class T_getter2>
+template <typename T_setter, typename T_getter1, typename T_getter2>
inline compose2_functor<T_setter, T_getter1, T_getter2>
compose(const T_setter& _A_setter, const T_getter1& _A_getter1, const T_getter2& _A_getter2)
{
diff --git a/sigc++/adaptors/exception_catch.h b/sigc++/adaptors/exception_catch.h
index 164fd91..06a4558 100644
--- a/sigc++/adaptors/exception_catch.h
+++ b/sigc++/adaptors/exception_catch.h
@@ -55,7 +55,7 @@ namespace sigc
* @ingroup adaptors
*/
-template <class T_functor, class T_catcher>
+template <typename T_functor, typename T_catcher>
struct exception_catch_functor : public adapts<T_functor>
{
decltype(auto) operator()()
@@ -70,7 +70,7 @@ struct exception_catch_functor : public adapts<T_functor>
}
}
- template <class... T_arg>
+ template <typename... T_arg>
decltype(auto) operator()(T_arg... _A_a)
{
try
@@ -93,7 +93,7 @@ struct exception_catch_functor : public adapts<T_functor>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// template specialization of visitor<>::do_visit_each<>(action, functor):
-template <class T_functor, class T_catcher>
+template <typename T_functor, typename T_catcher>
struct visitor<exception_catch_functor<T_functor, T_catcher>>
{
template <typename T_action>
@@ -106,7 +106,7 @@ struct visitor<exception_catch_functor<T_functor, T_catcher>>
};
#endif // DOXYGEN_SHOULD_SKIP_THIS
-template <class T_functor, class T_catcher>
+template <typename T_functor, typename T_catcher>
inline decltype(auto)
exception_catch(const T_functor& _A_func, const T_catcher& _A_catcher)
{
diff --git a/sigc++/adaptors/hide.h b/sigc++/adaptors/hide.h
index 78e379c..43d914f 100644
--- a/sigc++/adaptors/hide.h
+++ b/sigc++/adaptors/hide.h
@@ -66,14 +66,14 @@ namespace sigc
*
* @ingroup hide
*/
-template <int I_location, class T_functor>
+template <int I_location, typename T_functor>
struct hide_functor : public adapts<T_functor>
{
/** Invokes the wrapped functor, ignoring the argument at index @e I_location (0-indexed).
* @param _A_a Arguments to be passed on to the functor, apart from the ignored argument.
* @return The return value of the functor invocation.
*/
- template <class... T_arg>
+ template <typename... T_arg>
decltype(auto) operator()(T_arg&&... _A_a)
{
constexpr auto size = sizeof...(T_arg);
@@ -101,7 +101,7 @@ struct hide_functor : public adapts<T_functor>
private:
// TODO_variadic: Replace this with std::experimental::apply() if that becomes standard
// C++, or add our own implementation, to avoid code duplication.
- template <class T_tuple, std::size_t... Is>
+ template <typename T_tuple, std::size_t... Is>
decltype(auto) call_functor_operator_parentheses(T_tuple& tuple, std::index_sequence<Is...>)
{
return this->functor_.template operator()(std::get<Is>(tuple)...);
@@ -116,7 +116,7 @@ private:
*
* @ingroup hide
*/
-template <int I_location, class T_functor>
+template <int I_location, typename T_functor>
struct visitor<hide_functor<I_location, T_functor>>
{
template <typename T_action>
@@ -138,7 +138,7 @@ struct visitor<hide_functor<I_location, T_functor>>
*
* @ingroup hide
*/
-template <int I_location, class T_functor>
+template <int I_location, typename T_functor>
inline decltype(auto)
hide(const T_functor& _A_func)
{
@@ -154,7 +154,7 @@ hide(const T_functor& _A_func)
*
* @ingroup hide
*/
-template <class T_functor>
+template <typename T_functor>
inline decltype(auto)
hide(const T_functor& _A_func)
{
diff --git a/sigc++/adaptors/retype.h b/sigc++/adaptors/retype.h
index 7e75e47..660232d 100644
--- a/sigc++/adaptors/retype.h
+++ b/sigc++/adaptors/retype.h
@@ -58,10 +58,10 @@ namespace sigc
*
* @ingroup retype
*/
-template <class T_functor, class... T_type>
+template <typename T_functor, typename... T_type>
struct retype_functor : public adapts<T_functor>
{
- template <class... T_arg>
+ template <typename... T_arg>
decltype(auto) operator()(T_arg... _A_a)
{
return this->functor_.template operator()<type_trait_take_t<T_type>...>(
@@ -85,7 +85,7 @@ struct retype_functor : public adapts<T_functor>
*
* @ingroup retype
*/
-template <class T_functor, class... T_type>
+template <typename T_functor, typename... T_type>
struct visitor<retype_functor<T_functor, T_type...>>
{
template <typename T_action>
@@ -106,7 +106,7 @@ struct visitor<retype_functor<T_functor, T_type...>>
*
* @ingroup retype
*/
-template <template <class T_func, class... T_arg> class T_functor, class T_func, class... T_arg>
+template <template <typename T_func, typename... T_arg> class T_functor, typename T_func, typename... T_arg>
inline decltype(auto)
retype(const T_functor<T_func, T_arg...>& _A_functor)
{
@@ -122,7 +122,7 @@ retype(const T_functor<T_func, T_arg...>& _A_functor)
*
* @ingroup retype
*/
-template <template <class T_return, class... T_arg> class T_functor, class T_return, class... T_arg>
+template <template <typename T_return, typename... T_arg> class T_functor, typename T_return, typename...
T_arg>
inline decltype(auto)
retype(const T_functor<T_return(T_arg...)>& _A_functor)
{
diff --git a/sigc++/adaptors/retype_return.h b/sigc++/adaptors/retype_return.h
index bbe8241..314fbb6 100644
--- a/sigc++/adaptors/retype_return.h
+++ b/sigc++/adaptors/retype_return.h
@@ -15,12 +15,12 @@ namespace sigc
*
* @ingroup retype
*/
-template <class T_return, class T_functor>
+template <typename T_return, typename T_functor>
struct retype_return_functor : public adapts<T_functor>
{
T_return operator()();
- template <class... T_arg>
+ template <typename... T_arg>
inline T_return operator()(T_arg&&... _A_a)
{
return T_return(this->functor_.template operator() < T_arg... > (std::forward<T_arg>(_A_a)...));
@@ -38,7 +38,7 @@ struct retype_return_functor : public adapts<T_functor>
}
};
-template <class T_return, class T_functor>
+template <typename T_return, typename T_functor>
T_return
retype_return_functor<T_return, T_functor>::operator()()
{
@@ -55,12 +55,12 @@ retype_return_functor<T_return, T_functor>::operator()()
*/
/* The void specialization is needed because of explicit cast to T_return.
*/
-template <class T_functor>
+template <typename T_functor>
struct retype_return_functor<void, T_functor> : public adapts<T_functor>
{
void operator()();
- template <class... T_arg>
+ template <typename... T_arg>
inline void operator()(T_arg... _A_a)
{
this->functor_.template operator()<T_arg...>(_A_a...);
@@ -70,7 +70,7 @@ struct retype_return_functor<void, T_functor> : public adapts<T_functor>
retype_return_functor(type_trait_take_t<T_functor> _A_functor) : adapts<T_functor>(_A_functor) {}
};
-template <class T_functor>
+template <typename T_functor>
void
retype_return_functor<void, T_functor>::operator()()
{
@@ -85,7 +85,7 @@ retype_return_functor<void, T_functor>::operator()()
*
* @ingroup retype
*/
-template <class T_return, class T_functor>
+template <typename T_return, typename T_functor>
struct visitor<retype_return_functor<T_return, T_functor>>
{
template <typename T_action>
@@ -106,7 +106,7 @@ struct visitor<retype_return_functor<T_return, T_functor>>
*
* @ingroup retype
*/
-template <class T_return, class T_functor>
+template <typename T_return, typename T_functor>
inline retype_return_functor<T_return, T_functor>
retype_return(const T_functor& _A_functor)
{
@@ -121,7 +121,7 @@ retype_return(const T_functor& _A_functor)
*
* @ingroup hide
*/
-template <class T_functor>
+template <typename T_functor>
inline retype_return_functor<void, T_functor>
hide_return(const T_functor& _A_functor)
{
diff --git a/sigc++/functors/functor_trait.h b/sigc++/functors/functor_trait.h
index 3a78d8d..bc1696b 100644
--- a/sigc++/functors/functor_trait.h
+++ b/sigc++/functors/functor_trait.h
@@ -35,7 +35,7 @@ namespace sigc
*
* @ingroup sigcfunctors
*/
-template <class T_functor>
+template <typename T_functor>
struct functor_trait
{
using functor_type = T_functor;
@@ -46,7 +46,7 @@ struct functor_trait
// functor ptr fun:
-template <class T_return, class... T_arg>
+template <typename T_return, typename... T_arg>
struct functor_trait<T_return (*)(T_arg...)>
{
using functor_type = pointer_functor<T_return(T_arg...)>;
@@ -54,13 +54,13 @@ struct functor_trait<T_return (*)(T_arg...)>
// functor mem fun:
-template <class T_return, class T_obj, class... T_arg>
+template <typename T_return, typename T_obj, typename... T_arg>
struct functor_trait<T_return (T_obj::*)(T_arg...)>
{
using functor_type = mem_functor<T_return (T_obj::*)(T_arg...), T_arg...>;
};
-template <class T_return, class T_obj, class... T_arg>
+template <typename T_return, typename T_obj, typename... T_arg>
struct functor_trait<T_return (T_obj::*)(T_arg...) const>
{
using functor_type = mem_functor<T_return (T_obj::*)(T_arg...) const, T_arg...>;
diff --git a/sigc++/functors/mem_fun.h b/sigc++/functors/mem_fun.h
index 2672f66..a85be06 100644
--- a/sigc++/functors/mem_fun.h
+++ b/sigc++/functors/mem_fun.h
@@ -68,7 +68,7 @@ namespace sigc
* @ingroup sigcfunctors
*/
-template <class T_func, class... T_arg>
+template <typename T_func, typename... T_arg>
class mem_functor
{
public:
@@ -102,7 +102,7 @@ protected:
function_type func_ptr_;
};
-template <class T_func, class... T_arg>
+template <typename T_func, typename... T_arg>
class bound_mem_functor : mem_functor<T_func, T_arg...>
{
using base_type = mem_functor<T_func, T_arg...>;
@@ -151,10 +151,10 @@ public:
*
* @ingroup mem_fun
*/
-template <class T_func, class... T_arg>
+template <typename T_func, typename... T_arg>
struct visitor<bound_mem_functor<T_func, T_arg...>>
{
- template <class T_action>
+ template <typename T_action>
static void do_visit_each(
const T_action& _A_action, const bound_mem_functor<T_func, T_arg...>& _A_target)
{
@@ -169,7 +169,7 @@ struct visitor<bound_mem_functor<T_func, T_arg...>>
*
* @ingroup mem_fun
*/
-template <class T_return, class T_obj, class... T_arg>
+template <typename T_return, typename T_obj, typename... T_arg>
inline decltype(auto)
mem_fun(T_return (T_obj::*_A_func)(T_arg...))
{
@@ -182,7 +182,7 @@ mem_fun(T_return (T_obj::*_A_func)(T_arg...))
*
* @ingroup mem_fun
*/
-template <class T_return, class T_obj, class... T_arg>
+template <typename T_return, typename T_obj, typename... T_arg>
inline decltype(auto)
mem_fun(T_return (T_obj::*_A_func)(T_arg...) const)
{
@@ -195,7 +195,7 @@ mem_fun(T_return (T_obj::*_A_func)(T_arg...) const)
*
* @ingroup mem_fun
*/
-template <class T_return, class T_obj, class... T_arg>
+template <typename T_return, typename T_obj, typename... T_arg>
inline decltype(auto)
mem_fun(T_return (T_obj::*_A_func)(T_arg...) volatile)
{
@@ -208,7 +208,7 @@ mem_fun(T_return (T_obj::*_A_func)(T_arg...) volatile)
*
* @ingroup mem_fun
*/
-template <class T_return, class T_obj, class... T_arg>
+template <typename T_return, typename T_obj, typename... T_arg>
inline decltype(auto)
mem_fun(T_return (T_obj::*_A_func)(T_arg...) const volatile)
{
@@ -223,7 +223,7 @@ mem_fun(T_return (T_obj::*_A_func)(T_arg...) const volatile)
*
* @ingroup mem_fun
*/
-template <class T_return, class T_obj, class T_obj2, class... T_arg>
+template <typename T_return, typename T_obj, typename T_obj2, typename... T_arg>
inline decltype(auto)
mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg...))
{
@@ -238,7 +238,7 @@ mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg...))
*
* @ingroup mem_fun
*/
-template <class T_return, class T_obj, class T_obj2, class... T_arg>
+template <typename T_return, typename T_obj, typename T_obj2, typename... T_arg>
inline decltype(auto)
mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg...) const)
{
@@ -253,7 +253,7 @@ mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg...) const)
*
* @ingroup mem_fun
*/
-template <class T_return, class T_obj, class T_obj2, class... T_arg>
+template <typename T_return, typename T_obj, typename T_obj2, typename... T_arg>
inline decltype(auto)
mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg...) volatile)
{
@@ -268,7 +268,7 @@ mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg...) volatile)
*
* @ingroup mem_fun
*/
-template <class T_return, class T_obj, class T_obj2, class... T_arg>
+template <typename T_return, typename T_obj, typename T_obj2, typename... T_arg>
inline decltype(auto)
mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg...) const volatile)
{
diff --git a/sigc++/functors/ptr_fun.h b/sigc++/functors/ptr_fun.h
index 3d01fe5..36b2203 100644
--- a/sigc++/functors/ptr_fun.h
+++ b/sigc++/functors/ptr_fun.h
@@ -49,10 +49,10 @@ namespace sigc
*
* @ingroup ptr_fun
*/
-template <class T_return, class... T_args>
+template <typename T_return, typename... T_args>
class pointer_functor;
-template <class T_return, class... T_args>
+template <typename T_return, typename... T_args>
class pointer_functor<T_return(T_args...)>
{
using function_type = T_return (*)(T_args...);
@@ -84,7 +84,7 @@ public:
*
* @ingroup ptr_fun
*/
-template <class T_return, class... T_args>
+template <typename T_return, typename... T_args>
inline decltype(auto) ptr_fun(T_return (*_A_func)(T_args...))
{
return pointer_functor<T_return(T_args...)>(_A_func);
diff --git a/sigc++/functors/slot.h b/sigc++/functors/slot.h
index 83d5d03..59dc3c6 100644
--- a/sigc++/functors/slot.h
+++ b/sigc++/functors/slot.h
@@ -19,7 +19,7 @@ namespace internal
* notification callback. Consequently the slot_rep object will be
* notified when some referred object is destroyed or overwritten.
*/
-template <class T_functor>
+template <typename T_functor>
struct typed_slot_rep : public slot_rep
{
private:
@@ -97,7 +97,7 @@ private:
* - @e T_arg Argument types used in the definition of call_it().
*
*/
-template <class T_functor, class T_return, class... T_arg>
+template <typename T_functor, typename T_return, typename... T_arg>
struct slot_call
{
/** Invokes a functor of type @p T_functor.
@@ -148,10 +148,10 @@ struct slot_call
*
* @ingroup slot
*/
-template <class T_return, class... T_arg>
+template <typename T_return, typename... T_arg>
class slot;
-template <class T_return, class... T_arg>
+template <typename T_return, typename... T_arg>
class slot<T_return(T_arg...)> : public slot_base
{
public:
@@ -181,7 +181,7 @@ public:
/** Constructs a slot from an arbitrary functor.
* @param _A_func The desired functor the new slot should be assigned to.
*/
- template <class T_functor>
+ template <typename T_functor>
slot(const T_functor& _A_func) : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
{
// The slot_base:: is necessary to stop the HP-UX aCC compiler from being confused. murrayc.
diff --git a/sigc++/limit_reference.h b/sigc++/limit_reference.h
index 9167d87..ce094a1 100644
--- a/sigc++/limit_reference.h
+++ b/sigc++/limit_reference.h
@@ -28,7 +28,7 @@ namespace sigc
*
* - @e T_type The type of the reference.
*/
-template <class T_type,
+template <typename T_type,
bool I_derives_trackable = std::is_base_of<trackable, std::decay_t<T_type>>::value>
class limit_reference
{
@@ -62,7 +62,7 @@ private:
/** limit_reference object for a class that derives from trackable.
* - @e T_type The type of the reference.
*/
-template <class T_type>
+template <typename T_type>
class limit_reference<T_type, true>
{
public:
@@ -108,10 +108,10 @@ private:
* @param _A_action The functor to invoke.
* @param _A_target The visited instance.
*/
-template <class T_type>
+template <typename T_type>
struct visitor<limit_reference<T_type>>
{
- template <class T_action>
+ template <typename T_action>
static void do_visit_each(const T_action& _A_action, const limit_reference<T_type>& _A_target)
{
sigc::visit_each(_A_action, _A_target.visit());
diff --git a/sigc++/member_method_trait.h b/sigc++/member_method_trait.h
index cd6cc32..a8a1458 100644
--- a/sigc++/member_method_trait.h
+++ b/sigc++/member_method_trait.h
@@ -27,55 +27,55 @@ namespace sigc
namespace internal
{
-template <class>
+template <typename>
struct member_method_is_const;
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_is_const<T_result (T_obj::*)(T_arg...)>
{
constexpr static bool value = false;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_is_const<T_result (T_obj::*)(T_arg...) volatile>
{
constexpr static bool value = false;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_is_const<T_result (T_obj::*)(T_arg...) const>
{
constexpr static bool value = true;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_is_const<T_result (T_obj::*)(T_arg...) const volatile>
{
constexpr static bool value = true;
};
-template <class>
+template <typename>
struct member_method_is_volatile;
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_is_volatile<T_result (T_obj::*)(T_arg...)>
{
constexpr static bool value = false;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_is_volatile<T_result (T_obj::*)(T_arg...) const>
{
constexpr static bool value = false;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_is_volatile<T_result (T_obj::*)(T_arg...) volatile>
{
constexpr static bool value = true;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_is_volatile<T_result (T_obj::*)(T_arg...) const volatile>
{
constexpr static bool value = true;
@@ -83,30 +83,30 @@ struct member_method_is_volatile<T_result (T_obj::*)(T_arg...) const volatile>
// member method class:
-template <class T_result, class... T_arg>
+template <typename T_result, typename... T_arg>
struct member_method_class
{
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_class<T_result (T_obj::*)(T_arg...)>
{
using type = T_obj;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_class<T_result (T_obj::*)(T_arg...) volatile>
{
using type = T_obj;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_class<T_result (T_obj::*)(T_arg...) const>
{
using type = T_obj;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_class<T_result (T_obj::*)(T_arg...) const volatile>
{
using type = T_obj;
@@ -114,30 +114,30 @@ struct member_method_class<T_result (T_obj::*)(T_arg...) const volatile>
// member method result:
-template <class T_result, class... T_arg>
+template <typename T_result, typename... T_arg>
struct member_method_result
{
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_result<T_result (T_obj::*)(T_arg...)>
{
using type = T_result;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_result<T_result (T_obj::*)(T_arg...) volatile>
{
using type = T_result;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_result<T_result (T_obj::*)(T_arg...) const>
{
using type = T_result;
};
-template <class T_obj, class T_result, class... T_arg>
+template <typename T_obj, typename T_result, typename... T_arg>
struct member_method_result<T_result (T_obj::*)(T_arg...) const volatile>
{
using type = T_result;
diff --git a/sigc++/reference_wrapper.h b/sigc++/reference_wrapper.h
index f6c2fb2..41f3661 100644
--- a/sigc++/reference_wrapper.h
+++ b/sigc++/reference_wrapper.h
@@ -22,32 +22,32 @@
namespace sigc
{
-template <class T_type>
+template <typename T_type>
struct unwrap_reference
{
using type = T_type;
};
-template <class T_type>
+template <typename T_type>
struct unwrap_reference<std::reference_wrapper<T_type>>
{
using type = T_type&;
};
-template <class T_type>
+template <typename T_type>
struct unwrap_reference<std::reference_wrapper<const T_type>>
{
using type = const T_type&;
};
-template <class T_type>
+template <typename T_type>
T_type&
unwrap(const std::reference_wrapper<T_type>& v)
{
return v;
}
-template <class T_type>
+template <typename T_type>
const T_type&
unwrap(const std::reference_wrapper<const T_type>& v)
{
diff --git a/sigc++/signal.h b/sigc++/signal.h
index 7a4fad5..70e89ae 100644
--- a/sigc++/signal.h
+++ b/sigc++/signal.h
@@ -160,7 +160,7 @@ struct slot_const_iterator
*
* @ingroup signal
*/
-template <class T_slot>
+template <typename T_slot>
struct slot_list
{
using slot_type = T_slot;
@@ -249,7 +249,7 @@ namespace internal
* the slot. The return value is buffered, so that in an expression
* like @code a = (*i) * (*i); @endcode the slot is executed only once.
*/
-template <class T_emitter, class T_result = typename T_emitter::result_type>
+template <typename T_emitter, typename T_result = typename T_emitter::result_type>
struct slot_iterator_buf
{
using size_type = std::size_t;
@@ -332,7 +332,7 @@ private:
/** Template specialization of slot_iterator_buf for void return signals.
*/
-template <class T_emitter>
+template <typename T_emitter>
struct slot_iterator_buf<T_emitter, void>
{
using size_type = std::size_t;
@@ -400,7 +400,7 @@ private:
};
/** Reverse version of sigc::internal::slot_iterator_buf. */
-template <class T_emitter, class T_result = typename T_emitter::result_type>
+template <typename T_emitter, typename T_result = typename T_emitter::result_type>
struct slot_reverse_iterator_buf
{
using size_type = std::size_t;
@@ -486,7 +486,7 @@ private:
/** Template specialization of slot_reverse_iterator_buf for void return signals.
*/
-template <class T_emitter>
+template <typename T_emitter>
struct slot_reverse_iterator_buf<T_emitter, void>
{
using size_type = std::size_t;
@@ -593,7 +593,7 @@ private:
* emission when no accumulator is used, for example when the template
* argument @e T_accumulator is @p void.
*/
-template <class T_return, class T_accumulator, class... T_arg>
+template <typename T_return, typename T_accumulator, typename... T_arg>
struct signal_emit
{
using self_type = signal_emit<T_return, T_accumulator, T_arg...>;
@@ -675,7 +675,7 @@ private:
* This template specialization implements an optimized emit()
* function for the case that no accumulator is used.
*/
-template <class T_return, class... T_arg>
+template <typename T_return, typename... T_arg>
struct signal_emit<T_return, void, T_arg...>
{
private:
@@ -781,7 +781,7 @@ public:
* function for the case that no accumulator is used and the
* return type is @p void.
*/
-template <class... T_arg>
+template <typename... T_arg>
struct signal_emit<void, void, T_arg...>
{
private:
@@ -864,7 +864,7 @@ public:
*
* @ingroup signal
*/
-template <class T_return, class T_accumulator, class... T_arg>
+template <typename T_return, typename T_accumulator, typename... T_arg>
class signal_with_accumulator : public signal_base
{
public:
@@ -1027,10 +1027,10 @@ public:
*
* @ingroup signal
*/
-template <class T_return, class... T_arg>
+template <typename T_return, typename... T_arg>
class signal;
-template <class T_return, class... T_arg>
+template <typename T_return, typename... T_arg>
class signal<T_return(T_arg...)> : public signal_with_accumulator<T_return, void, T_arg...>
{
public:
@@ -1079,7 +1079,7 @@ public:
*
* @ingroup signal
*/
- template <class T_accumulator>
+ template <typename T_accumulator>
class accumulated : public signal_with_accumulator<T_return, T_accumulator, T_arg...>
{
public:
diff --git a/sigc++/tuple-utils/tuple_transform_each.h b/sigc++/tuple-utils/tuple_transform_each.h
index ff7b6a4..55d2e31 100644
--- a/sigc++/tuple-utils/tuple_transform_each.h
+++ b/sigc++/tuple-utils/tuple_transform_each.h
@@ -68,7 +68,7 @@ struct tuple_transform_each_impl
}
};
-template <template <typename> class T_transformer>
+template <template <typename> typename T_transformer>
struct tuple_transform_each_impl<T_transformer, 1>
{
template <typename T_current, typename T_original>
diff --git a/sigc++/type_traits.h b/sigc++/type_traits.h
index 9eb1af9..79bd868 100644
--- a/sigc++/type_traits.h
+++ b/sigc++/type_traits.h
@@ -24,28 +24,28 @@
namespace sigc
{
-template <class T_type>
+template <typename T_type>
struct type_trait
{
using pass = T_type&;
using take = const T_type&;
};
-template <class T_type, int N>
+template <typename T_type, int N>
struct type_trait<T_type[N]>
{
using pass = T_type*&;
using take = const T_type*&;
};
-template <class T_type>
+template <typename T_type>
struct type_trait<T_type&>
{
using pass = T_type&;
using take = T_type&;
};
-template <class T_type>
+template <typename T_type>
struct type_trait<const T_type&>
{
using pass = const T_type&;
diff --git a/sigc++/visit_each.h b/sigc++/visit_each.h
index 99039f4..ea863a9 100644
--- a/sigc++/visit_each.h
+++ b/sigc++/visit_each.h
@@ -30,16 +30,16 @@ struct trackable;
namespace internal
{
-template <class Base, class Derived>
+template <typename Base, typename Derived>
constexpr bool is_base_of_or_same_v =
std::is_base_of<std::decay_t<Base>, std::decay_t<Derived>>::value ||
std::is_same<std::decay_t<Base>, std::decay_t<Derived>>::value;
/// Helper struct for visit_each_trackable().
-template <class T_action>
+template <typename T_action>
struct limit_trackable_target
{
- template <class T_type>
+ template <typename T_type>
void operator()(T_type&& _A_type) const
{
using T_self = limit_trackable_target<T_action>;
@@ -58,18 +58,18 @@ struct limit_trackable_target
T_action action_;
private:
- template <class T_type, class T_limit, bool I_derived = is_base_of_or_same_v<sigc::trackable, T_type>>
+ template <typename T_type, typename T_limit, bool I_derived = is_base_of_or_same_v<sigc::trackable,
T_type>>
struct with_type;
// Specialization for I_derived = false
- template <class T_type, class T_limit>
+ template <typename T_type, typename T_limit>
struct with_type<T_type, T_limit, false>
{
static void execute_(const T_type&, const T_limit&) {}
};
// Specialization for I_derived = true
- template <class T_type, class T_limit>
+ template <typename T_type, typename T_limit>
struct with_type<T_type, T_limit, true>
{
static void execute_(const T_type& _A_type, const T_limit& _A_action)
@@ -113,7 +113,7 @@ private:
* template <>
* struct visitor<some_ns::some_functor>
* {
- * template <class T_action>
+ * template <typename T_action>
* static void do_visit_each(const T_action& _A_action,
* const some_ns::some_functor& _A_target)
* {
@@ -126,10 +126,10 @@ private:
*
* @ingroup sigcfunctors
*/
-template <class T_functor>
+template <typename T_functor>
struct visitor
{
- template <class T_action>
+ template <typename T_action>
static void do_visit_each(const T_action& _A_action, const T_functor& _A_functor)
{
_A_action(_A_functor);
@@ -140,7 +140,7 @@ struct visitor
*
* @ingroup sigcfunctors
*/
-template <class T_action, class T_functor>
+template <typename T_action, typename T_functor>
void
visit_each(const T_action& _A_action, const T_functor& _A_functor)
{
@@ -162,7 +162,7 @@ visit_each(const T_action& _A_action, const T_functor& _A_functor)
*
* @ingroup sigcfunctors
*/
-template <class T_action, class T_functor>
+template <typename T_action, typename T_functor>
void
visit_each_trackable(const T_action& _A_action, const T_functor& _A_functor)
{
diff --git a/tests/test_accum_iter.cc b/tests/test_accum_iter.cc
index 43cf2d7..9a00e39 100644
--- a/tests/test_accum_iter.cc
+++ b/tests/test_accum_iter.cc
@@ -20,7 +20,7 @@ struct min_accum
{
using result_type = T;
- template <class I>
+ template <typename I>
typename std::iterator_traits<I>::value_type operator()(I i1, I i2)
{
return *std::min_element(i1, i2);
diff --git a/tests/test_accumulated.cc b/tests/test_accumulated.cc
index 4e60136..3804536 100644
--- a/tests/test_accumulated.cc
+++ b/tests/test_accumulated.cc
@@ -33,7 +33,7 @@ struct arithmetic_mean_accumulator
}
};
-template <class Ret>
+template <typename Ret>
struct vector_accumulator
{
using result_type = std::vector<Ret>;
diff --git a/tests/test_bind_refptr.cc b/tests/test_bind_refptr.cc
index 04ad92c..18d6942 100644
--- a/tests/test_bind_refptr.cc
+++ b/tests/test_bind_refptr.cc
@@ -60,7 +60,7 @@ namespace Glib
* See the "Memory Management" section in the "Programming with gtkmm"
* book for further information.
*/
-template <class T_CppObject>
+template <typename T_CppObject>
class RefPtr
{
public:
@@ -86,7 +86,7 @@ public:
*
* Increments the reference count.
*/
- template <class T_CastFrom>
+ template <typename T_CastFrom>
inline RefPtr(const RefPtr<T_CastFrom>& src);
/** Swap the contents of two RefPtr<>.
@@ -103,7 +103,7 @@ public:
*
* Increments the reference count.
*/
- template <class T_CastFrom>
+ template <typename T_CastFrom>
inline RefPtr<T_CppObject>& operator=(const RefPtr<T_CastFrom>& src);
/// Tests whether the RefPtr<> point to the same underlying instance.
@@ -147,7 +147,7 @@ public:
* ptr_derived = RefPtr<Derived>::cast_dynamic(ptr_base);
* @endcode
*/
- template <class T_CastFrom>
+ template <typename T_CastFrom>
static inline RefPtr<T_CppObject> cast_dynamic(const RefPtr<T_CastFrom>& src);
/** Static cast to derived class.
@@ -157,7 +157,7 @@ public:
* ptr_derived = RefPtr<Derived>::cast_static(ptr_base);
* @endcode
*/
- template <class T_CastFrom>
+ template <typename T_CastFrom>
static inline RefPtr<T_CppObject> cast_static(const RefPtr<T_CastFrom>& src);
/** Cast to non-const.
@@ -167,7 +167,7 @@ public:
* ptr_unconst = RefPtr<UnConstType>::cast_const(ptr_const);
* @endcode
*/
- template <class T_CastFrom>
+ template <typename T_CastFrom>
static inline RefPtr<T_CppObject> cast_const(const RefPtr<T_CastFrom>& src);
/** Compare based on the underlying instance address.
@@ -199,30 +199,30 @@ private:
// RefPtr<>::operator->() comes first here since it's used by other methods.
// If it would come after them it wouldn't be inlined.
-template <class T_CppObject>
+template <typename T_CppObject>
inline T_CppObject* RefPtr<T_CppObject>::operator->() const
{
return pCppObject_;
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline RefPtr<T_CppObject>::RefPtr() : pCppObject_(nullptr)
{
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline RefPtr<T_CppObject>::~RefPtr()
{
if (pCppObject_)
pCppObject_->unreference(); // This could cause pCppObject to be deleted.
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline RefPtr<T_CppObject>::RefPtr(T_CppObject* pCppObject) : pCppObject_(pCppObject)
{
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline RefPtr<T_CppObject>::RefPtr(const RefPtr<T_CppObject>& src) : pCppObject_(src.pCppObject_)
{
if (pCppObject_)
@@ -232,8 +232,8 @@ inline RefPtr<T_CppObject>::RefPtr(const RefPtr<T_CppObject>& src) : pCppObject_
// The templated ctor allows copy construction from any object that's
// castable. Thus, it does downcasts:
// base_ref = derived_ref
-template <class T_CppObject>
-template <class T_CastFrom>
+template <typename T_CppObject>
+template <typename T_CastFrom>
inline RefPtr<T_CppObject>::RefPtr(const RefPtr<T_CastFrom>& src)
: // A different RefPtr<> will not allow us access to pCppObject_. We need
// to add a get_underlying() for this, but that would encourage incorrect
@@ -244,7 +244,7 @@ inline RefPtr<T_CppObject>::RefPtr(const RefPtr<T_CastFrom>& src)
pCppObject_->reference();
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline void
RefPtr<T_CppObject>::swap(RefPtr<T_CppObject>& other)
{
@@ -253,7 +253,7 @@ RefPtr<T_CppObject>::swap(RefPtr<T_CppObject>& other)
other.pCppObject_ = temp;
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline RefPtr<T_CppObject>&
RefPtr<T_CppObject>::operator=(const RefPtr<T_CppObject>& src)
{
@@ -286,8 +286,8 @@ RefPtr<T_CppObject>::operator=(const RefPtr<T_CppObject>& src)
return *this;
}
-template <class T_CppObject>
-template <class T_CastFrom>
+template <typename T_CppObject>
+template <typename T_CastFrom>
inline RefPtr<T_CppObject>&
RefPtr<T_CppObject>::operator=(const RefPtr<T_CastFrom>& src)
{
@@ -296,28 +296,28 @@ RefPtr<T_CppObject>::operator=(const RefPtr<T_CastFrom>& src)
return *this;
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline bool
RefPtr<T_CppObject>::operator==(const RefPtr<T_CppObject>& src) const
{
return (pCppObject_ == src.pCppObject_);
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline bool
RefPtr<T_CppObject>::operator!=(const RefPtr<T_CppObject>& src) const
{
return (pCppObject_ != src.pCppObject_);
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline RefPtr<T_CppObject>::operator bool() const
{
return (pCppObject_ != nullptr);
}
#ifndef GLIBMM_DISABLE_DEPRECATED
-template <class T_CppObject>
+template <typename T_CppObject>
inline void
RefPtr<T_CppObject>::clear()
{
@@ -325,7 +325,7 @@ RefPtr<T_CppObject>::clear()
}
#endif // GLIBMM_DISABLE_DEPRECATED
-template <class T_CppObject>
+template <typename T_CppObject>
inline void
RefPtr<T_CppObject>::reset()
{
@@ -333,8 +333,8 @@ RefPtr<T_CppObject>::reset()
this->swap(temp);
}
-template <class T_CppObject>
-template <class T_CastFrom>
+template <typename T_CppObject>
+template <typename T_CastFrom>
inline RefPtr<T_CppObject>
RefPtr<T_CppObject>::cast_dynamic(const RefPtr<T_CastFrom>& src)
{
@@ -346,8 +346,8 @@ RefPtr<T_CppObject>::cast_dynamic(const RefPtr<T_CastFrom>& src)
return RefPtr<T_CppObject>(pCppObject);
}
-template <class T_CppObject>
-template <class T_CastFrom>
+template <typename T_CppObject>
+template <typename T_CastFrom>
inline RefPtr<T_CppObject>
RefPtr<T_CppObject>::cast_static(const RefPtr<T_CastFrom>& src)
{
@@ -359,8 +359,8 @@ RefPtr<T_CppObject>::cast_static(const RefPtr<T_CastFrom>& src)
return RefPtr<T_CppObject>(pCppObject);
}
-template <class T_CppObject>
-template <class T_CastFrom>
+template <typename T_CppObject>
+template <typename T_CastFrom>
inline RefPtr<T_CppObject>
RefPtr<T_CppObject>::cast_const(const RefPtr<T_CastFrom>& src)
{
@@ -372,28 +372,28 @@ RefPtr<T_CppObject>::cast_const(const RefPtr<T_CastFrom>& src)
return RefPtr<T_CppObject>(pCppObject);
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline bool
RefPtr<T_CppObject>::operator<(const RefPtr<T_CppObject>& src) const
{
return (pCppObject_ < src.pCppObject_);
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline bool
RefPtr<T_CppObject>::operator<=(const RefPtr<T_CppObject>& src) const
{
return (pCppObject_ <= src.pCppObject_);
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline bool
RefPtr<T_CppObject>::operator>(const RefPtr<T_CppObject>& src) const
{
return (pCppObject_ > src.pCppObject_);
}
-template <class T_CppObject>
+template <typename T_CppObject>
inline bool
RefPtr<T_CppObject>::operator>=(const RefPtr<T_CppObject>& src) const
{
@@ -403,7 +403,7 @@ RefPtr<T_CppObject>::operator>=(const RefPtr<T_CppObject>& src) const
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
/** @relates Glib::RefPtr */
-template <class T_CppObject>
+template <typename T_CppObject>
inline void
swap(RefPtr<T_CppObject>& lhs, RefPtr<T_CppObject>& rhs)
{
diff --git a/tests/test_tuple_for_each.cc b/tests/test_tuple_for_each.cc
index 6514b57..4a1f3f4 100644
--- a/tests/test_tuple_for_each.cc
+++ b/tests/test_tuple_for_each.cc
@@ -22,7 +22,7 @@
#include <iostream>
#include <functional>
-template <class T_element_from>
+template <typename T_element_from>
class for_each_simple
{
public:
@@ -46,7 +46,7 @@ test_tuple_for_each_same_types()
}
}
-template <class T_element_from>
+template <typename T_element_from>
class for_each_simple_with_extras
{
public:
@@ -66,7 +66,7 @@ test_tuple_for_each_same_types_with_extras()
}
}
-template <class T_element_from>
+template <typename T_element_from>
class for_each_simple_with_nonconst_extras
{
public:
@@ -89,7 +89,7 @@ test_tuple_for_each_same_types_with_nonconst_extras()
// The general template declaration.
// We then provide specializations for each type,
// so we can test having a different return value for each T_element_from type.
-template <class T_element_from>
+template <typename T_element_from>
class visitor_with_specializations;
// An int will be converted to a std::string:
@@ -143,7 +143,7 @@ test_tuple_for_each_multiple_types()
sigc::internal::tuple_for_each<visitor_with_specializations>(t_original);
}
-template <class T_element_from>
+template <typename T_element_from>
class for_each_nonconst
{
public:
@@ -190,7 +190,7 @@ test_tuple_for_each_stdref()
static std::string correct_sequence_output;
-template <class T_element_from>
+template <typename T_element_from>
class for_each_correct_sequence
{
public:
diff --git a/tests/test_tuple_transform_each.cc b/tests/test_tuple_transform_each.cc
index c9bcc90..247cbd7 100644
--- a/tests/test_tuple_transform_each.cc
+++ b/tests/test_tuple_transform_each.cc
@@ -20,7 +20,7 @@
#include <utility>
#include <functional>
-template <class T_element_from>
+template <typename T_element_from>
class transform_to_string
{
public:
@@ -67,7 +67,7 @@ test_tuple_transform_each_same_types()
// The general template declaration.
// We then provide specializations for each type,
// so we can test having a different return value for each T_element_from type.
-template <class T_element_from>
+template <typename T_element_from>
class transform_to_something;
// An int will be converted to a std::string:
@@ -113,7 +113,7 @@ test_tuple_transform_each_multiple_types()
"unexpected transform_each()ed tuple type");
}
-template <class T_element_from>
+template <typename T_element_from>
class transform_each_nonconst
{
public:
@@ -183,7 +183,7 @@ private:
int m_val;
};
-template <class T_element_from>
+template <typename T_element_from>
class transform_noncopyable_to_string
{
public:
@@ -214,7 +214,7 @@ test_tuple_transform_each_stdref_non_copyable()
static std::string correct_sequence_output;
-template <class T_element_from>
+template <typename T_element_from>
class transform_each_correct_sequence
{
public:
@@ -245,7 +245,7 @@ test_tuple_transform_each_empty_tuple()
// The general template declaration.
// We then provide specializations for each type,
// so we can test having a different return value for each T_element_from type.
-template <class T_element_from>
+template <typename T_element_from>
class transform_as_constexpr_to_something;
// An int will be converted to a char:
diff --git a/tests/test_visit_each.cc b/tests/test_visit_each.cc
index a22b620..90e2838 100644
--- a/tests/test_visit_each.cc
+++ b/tests/test_visit_each.cc
@@ -45,7 +45,7 @@ class NsExtClass
{
};
-template <class T_action, class T_functor>
+template <typename T_action, typename T_functor>
void
visit_each(T_action&, const T_functor&)
{
@@ -81,7 +81,7 @@ private:
namespace ns1
{
// User-defined adaptor, as decribed in adaptor_trait.h.
-template <class T_functor>
+template <typename T_functor>
struct MyAdaptor1 : public sigc::adapts<T_functor>
{
decltype(auto) operator()() const
@@ -90,14 +90,14 @@ struct MyAdaptor1 : public sigc::adapts<T_functor>
return this->functor_();
}
- template <class T_arg1>
+ template <typename T_arg1>
decltype(auto) operator()(T_arg1 _A_arg1) const
{
result_stream << "MyAdaptor1()(_A_arg1) ";
return this->functor_(_A_arg1);
}
- template <class T_arg1, class T_arg2>
+ template <typename T_arg1, typename T_arg2>
decltype(auto) operator()(T_arg1 _A_arg1, T_arg2 _A_arg2) const
{
result_stream << "MyAdaptor1()(_A_arg1, _A_arg2) ";
@@ -109,7 +109,7 @@ struct MyAdaptor1 : public sigc::adapts<T_functor>
explicit MyAdaptor1(const T_functor& _A_functor) : sigc::adapts<T_functor>(_A_functor) {}
};
-template <class T_action, class T_functor>
+template <typename T_action, typename T_functor>
void
visit_each(const T_action& _A_action, const MyAdaptor1<T_functor>& _A_target)
{
@@ -129,10 +129,10 @@ my_adaptor1(const T_functor& _A_func)
// Specialization of sigc::visitor for MyAdaptor1.
namespace sigc
{
-template <class T_functor>
+template <typename T_functor>
struct visitor<ns1::MyAdaptor1<T_functor>>
{
- template <class T_action>
+ template <typename T_action>
static void do_visit_each(const T_action& _A_action, const ns1::MyAdaptor1<T_functor>& _A_target)
{
sigc::visit_each(_A_action, _A_target.functor_);
diff --git a/tests/test_visit_each_trackable.cc b/tests/test_visit_each_trackable.cc
index 646adf8..27c57bd 100644
--- a/tests/test_visit_each_trackable.cc
+++ b/tests/test_visit_each_trackable.cc
@@ -22,16 +22,16 @@ struct A : public sigc::trackable
A() {}
};
-template <class T_type, bool I_derived = std::is_base_of<sigc::trackable, T_type>::value>
+template <typename T_type, bool I_derived = std::is_base_of<sigc::trackable, T_type>::value>
struct with_trackable;
-template <class T_type>
+template <typename T_type>
struct with_trackable<T_type, false>
{
static void perform(const T_type&) { result_stream << "other "; }
};
-template <class T_type>
+template <typename T_type>
struct with_trackable<T_type, true>
{
static void perform(const T_type&) { result_stream << "trackable "; }
@@ -45,7 +45,7 @@ struct print
{
void operator()(int i) const { result_stream << "int: " << i << " "; }
- template <class T>
+ template <typename T>
void operator()(const T& t) const
{
with_trackable<T>::perform(t);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]