Removed obsolete BOOST_DEDUCED_TYPENAME

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@716 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2014-04-26 07:05:53 +00:00
parent f04be9827f
commit 58c27a4f0c
12 changed files with 45 additions and 48 deletions

View file

@ -157,7 +157,7 @@ namespace detail
Expected_##n expected##n; Expected_##n expected##n;
#define MOCK_CONSTRAINT_CREF_PARAM(z, n, Args) \ #define MOCK_CONSTRAINT_CREF_PARAM(z, n, Args) \
BOOST_DEDUCED_TYPENAME \ typename \
boost::unwrap_reference< Expected_##n >::type \ boost::unwrap_reference< Expected_##n >::type \
BOOST_PP_ARRAY_ELEM(n, Args) BOOST_PP_ARRAY_ELEM(n, Args)

View file

@ -76,7 +76,7 @@ namespace detail
{ {
return os << "same( " << mock::format( *s.expected_ ) << " )"; return os << "same( " << mock::format( *s.expected_ ) << " )";
} }
const BOOST_DEDUCED_TYPENAME const typename
boost::unwrap_reference< Expected >::type* expected_; boost::unwrap_reference< Expected >::type* expected_;
}; };
@ -88,10 +88,10 @@ namespace detail
{} {}
template< typename Actual > template< typename Actual >
bool operator()( const Actual& actual, bool operator()( const Actual& actual,
BOOST_DEDUCED_TYPENAME boost::disable_if< typename boost::disable_if<
boost::is_convertible< boost::is_convertible<
const Actual*, const Actual*,
BOOST_DEDUCED_TYPENAME typename
boost::unwrap_reference< Expected >::type boost::unwrap_reference< Expected >::type
> >
>::type* = 0 ) const >::type* = 0 ) const
@ -101,9 +101,9 @@ namespace detail
} }
template< typename Actual > template< typename Actual >
bool operator()( Actual& actual, bool operator()( Actual& actual,
BOOST_DEDUCED_TYPENAME boost::enable_if< typename boost::enable_if<
boost::is_convertible< Actual*, boost::is_convertible< Actual*,
BOOST_DEDUCED_TYPENAME typename
boost::unwrap_reference< Expected >::type boost::unwrap_reference< Expected >::type
> >
>::type* = 0 ) const >::type* = 0 ) const
@ -115,7 +115,7 @@ namespace detail
{ {
return s << "retrieve( " << mock::format( *r.expected_ ) << " )"; return s << "retrieve( " << mock::format( *r.expected_ ) << " )";
} }
BOOST_DEDUCED_TYPENAME typename
boost::unwrap_reference< Expected >::type* expected_; boost::unwrap_reference< Expected >::type* expected_;
}; };
@ -133,9 +133,9 @@ namespace detail
} }
template< typename Actual > template< typename Actual >
bool operator()( Actual* actual, bool operator()( Actual* actual,
BOOST_DEDUCED_TYPENAME boost::enable_if< typename boost::enable_if<
boost::is_convertible< boost::is_convertible<
BOOST_DEDUCED_TYPENAME typename
boost::unwrap_reference< Expected >::type, boost::unwrap_reference< Expected >::type,
Actual Actual
> >

View file

@ -60,11 +60,11 @@ namespace detail
template< typename Result, typename Signature > template< typename Result, typename Signature >
class action class action
{ {
typedef BOOST_DEDUCED_TYPENAME typedef typename
boost::function< Signature > functor_type; boost::function< Signature > functor_type;
typedef BOOST_DEDUCED_TYPENAME typedef typename
boost::remove_reference< boost::remove_reference<
BOOST_DEDUCED_TYPENAME boost::remove_const< Result >::type typename boost::remove_const< Result >::type
>::type result_type; >::type result_type;
typedef lambda< Result, Signature > lambda_type; typedef lambda< Result, Signature > lambda_type;
@ -119,7 +119,7 @@ namespace detail
template< typename Result, typename Signature > template< typename Result, typename Signature >
class action< Result*, Signature > class action< Result*, Signature >
{ {
typedef BOOST_DEDUCED_TYPENAME typedef typename
boost::function< Signature > functor_type; boost::function< Signature > functor_type;
typedef lambda< Result*, Signature > lambda_type; typedef lambda< Result*, Signature > lambda_type;
@ -160,7 +160,7 @@ namespace detail
template< typename Signature > template< typename Signature >
class action< void, Signature > class action< void, Signature >
{ {
typedef BOOST_DEDUCED_TYPENAME typedef typename
boost::function< Signature > functor_type; boost::function< Signature > functor_type;
typedef lambda< void, Signature > lambda_type; typedef lambda< void, Signature > lambda_type;
@ -195,7 +195,7 @@ namespace detail
template< typename Result, typename Signature > template< typename Result, typename Signature >
class action< std::auto_ptr< Result >, Signature > class action< std::auto_ptr< Result >, Signature >
{ {
typedef BOOST_DEDUCED_TYPENAME typedef typename
boost::function< Signature > functor_type; boost::function< Signature > functor_type;
typedef lambda< std::auto_ptr< Result >, Signature > lambda_type; typedef lambda< std::auto_ptr< Result >, Signature > lambda_type;

View file

@ -167,8 +167,7 @@ namespace detail
}; };
typedef std::list< expectation_type > expectations_type; typedef std::list< expectation_type > expectations_type;
typedef BOOST_DEDUCED_TYPENAME typedef typename expectations_type::const_iterator expectations_cit;
expectations_type::const_iterator expectations_cit;
expectations_type expectations_; expectations_type expectations_;
context* context_; context* context_;

View file

@ -9,7 +9,7 @@
#include "function_impl_template.hpp" #include "function_impl_template.hpp"
#define MOCK_FUNCTION_CALL(z, n, d ) \ #define MOCK_FUNCTION_CALL(z, n, d ) \
BOOST_PP_COMMA_IF(n) BOOST_DEDUCED_TYPENAME \ BOOST_PP_COMMA_IF(n) typename \
boost::call_traits< T##n >::param_type boost::call_traits< T##n >::param_type
#define MOCK_FUNCTION_PARAM(z, n, d) \ #define MOCK_FUNCTION_PARAM(z, n, d) \
@ -38,9 +38,8 @@ namespace detail
typedef function_impl< typedef function_impl<
R ( BOOST_PP_REPEAT(MOCK_NUM_ARGS, MOCK_FUNCTION_CALL, _) ) R ( BOOST_PP_REPEAT(MOCK_NUM_ARGS, MOCK_FUNCTION_CALL, _) )
> impl_type; > impl_type;
typedef BOOST_DEDUCED_TYPENAME typedef typename impl_type::expectation_type expectation_type;
impl_type::expectation_type expectation_type; typedef typename impl_type::error_type error_type;
typedef BOOST_DEDUCED_TYPENAME impl_type::error_type error_type;
public: public:
function() function()

View file

@ -31,8 +31,7 @@ namespace detail
template< typename Result, typename Signature > template< typename Result, typename Signature >
struct lambda struct lambda
{ {
typedef BOOST_DEDUCED_TYPENAME typedef boost::function< Signature > functor_type;
boost::function< Signature > functor_type;
template< typename T > template< typename T >
static functor_type make_val( T t ) static functor_type make_val( T t )

View file

@ -21,9 +21,9 @@ namespace detail
template< typename Signature, int n > template< typename Signature, int n >
struct parameter struct parameter
{ {
typedef BOOST_DEDUCED_TYPENAME typedef typename
boost::mpl::at_c< boost::mpl::at_c<
BOOST_DEDUCED_TYPENAME typename
boost::function_types::parameter_types< Signature >, boost::function_types::parameter_types< Signature >,
n n
>::type type; >::type type;

View file

@ -28,11 +28,11 @@ namespace detail
boost::function_types::function_type< boost::function_types::function_type<
boost::mpl::joint_view< boost::mpl::joint_view<
boost::mpl::single_view< boost::mpl::single_view<
BOOST_DEDUCED_TYPENAME typename
boost::function_types::result_type< M >::type boost::function_types::result_type< M >::type
>, >,
BOOST_DEDUCED_TYPENAME boost::mpl::pop_front< typename boost::mpl::pop_front<
BOOST_DEDUCED_TYPENAME typename
boost::function_types::parameter_types< M > boost::function_types::parameter_types< M >
>::type >::type
> >

View file

@ -165,7 +165,7 @@ namespace detail
#endif #endif
template< typename T > template< typename T >
BOOST_DEDUCED_TYPENAME boost::enable_if< typename boost::enable_if<
boost::function_types::is_callable_builtin< T >, boost::function_types::is_callable_builtin< T >,
stream& stream&
>::type >::type
@ -174,7 +174,7 @@ namespace detail
return s << '?'; return s << '?';
} }
template< typename T > template< typename T >
BOOST_DEDUCED_TYPENAME boost::disable_if< typename boost::disable_if<
boost::function_types::is_callable_builtin< T >, boost::function_types::is_callable_builtin< T >,
stream& stream&
>::type >::type

View file

@ -84,7 +84,7 @@ namespace mock
template< typename Actual, typename Functor > template< typename Actual, typename Functor >
class matcher< Actual, Functor, class matcher< Actual, Functor,
BOOST_DEDUCED_TYPENAME boost::enable_if< typename boost::enable_if<
detail::is_functor< Functor, Actual > detail::is_functor< Functor, Actual >
>::type >::type
> : public detail::matcher_base< Actual > > : public detail::matcher_base< Actual >

View file

@ -39,7 +39,7 @@
mock::detail::functor< MOCK_FUNCTION_TYPE((__VA_ARGS__),) > f, f##_mock mock::detail::functor< MOCK_FUNCTION_TYPE((__VA_ARGS__),) > f, f##_mock
#define MOCK_FUNCTOR_TPL(f, ...) \ #define MOCK_FUNCTOR_TPL(f, ...) \
mock::detail::functor< \ mock::detail::functor< \
MOCK_FUNCTION_TYPE((__VA_ARGS__), BOOST_DEDUCED_TYPENAME) > f, f##_mock MOCK_FUNCTION_TYPE((__VA_ARGS__), typename) > f, f##_mock
#else // MOCK_VARIADIC_MACROS #else // MOCK_VARIADIC_MACROS
@ -50,7 +50,7 @@
mock::detail::functor< MOCK_FUNCTION_TYPE(S,) > f, f##_mock mock::detail::functor< MOCK_FUNCTION_TYPE(S,) > f, f##_mock
#define MOCK_FUNCTOR_TPL(f, S) \ #define MOCK_FUNCTOR_TPL(f, S) \
mock::detail::functor< \ mock::detail::functor< \
MOCK_FUNCTION_TYPE(S, BOOST_DEDUCED_TYPENAME) > f, f##_mock MOCK_FUNCTION_TYPE(S, typename) > f, f##_mock
#endif // MOCK_VARIADIC_MACROS #endif // MOCK_VARIADIC_MACROS
@ -104,15 +104,15 @@
MOCK_METHOD_HELPER(S, t,) MOCK_METHOD_HELPER(S, t,)
#define MOCK_METHOD_EXT_TPL(M, n, S, t) \ #define MOCK_METHOD_EXT_TPL(M, n, S, t) \
MOCK_METHOD_AUX(M, n, S, t,, BOOST_DEDUCED_TYPENAME) \ MOCK_METHOD_AUX(M, n, S, t,, typename) \
MOCK_METHOD_AUX(M, n, S, t, const, BOOST_DEDUCED_TYPENAME) \ MOCK_METHOD_AUX(M, n, S, t, const, typename) \
MOCK_METHOD_HELPER(S, t, BOOST_DEDUCED_TYPENAME) MOCK_METHOD_HELPER(S, t, typename)
#define MOCK_CONST_METHOD_EXT_TPL(M, n, S, t) \ #define MOCK_CONST_METHOD_EXT_TPL(M, n, S, t) \
MOCK_METHOD_AUX(M, n, S, t, const, BOOST_DEDUCED_TYPENAME) \ MOCK_METHOD_AUX(M, n, S, t, const, typename) \
MOCK_METHOD_HELPER(S, t, BOOST_DEDUCED_TYPENAME) MOCK_METHOD_HELPER(S, t, typename)
#define MOCK_NON_CONST_METHOD_EXT_TPL(M, n, S, t) \ #define MOCK_NON_CONST_METHOD_EXT_TPL(M, n, S, t) \
MOCK_METHOD_AUX(M, n, S, t,, BOOST_DEDUCED_TYPENAME) \ MOCK_METHOD_AUX(M, n, S, t,, typename) \
MOCK_METHOD_HELPER(S, t, BOOST_DEDUCED_TYPENAME) MOCK_METHOD_HELPER(S, t, typename)
#define MOCK_CONVERSION_OPERATOR(M, T, t) \ #define MOCK_CONVERSION_OPERATOR(M, T, t) \
M T() const { return MOCK_ANONYMOUS_HELPER(t)(); } \ M T() const { return MOCK_ANONYMOUS_HELPER(t)(); } \
@ -128,13 +128,13 @@
#define MOCK_CONVERSION_OPERATOR_TPL(M, T, t) \ #define MOCK_CONVERSION_OPERATOR_TPL(M, T, t) \
M T() const { return MOCK_ANONYMOUS_HELPER(t)(); } \ M T() const { return MOCK_ANONYMOUS_HELPER(t)(); } \
M T() { return MOCK_ANONYMOUS_HELPER(t)(); } \ M T() { return MOCK_ANONYMOUS_HELPER(t)(); } \
MOCK_METHOD_HELPER(T(), t, BOOST_DEDUCED_TYPENAME) MOCK_METHOD_HELPER(T(), t, typename)
#define MOCK_CONST_CONVERSION_OPERATOR_TPL(M, T, t) \ #define MOCK_CONST_CONVERSION_OPERATOR_TPL(M, T, t) \
M T() const { return MOCK_ANONYMOUS_HELPER(t)(); } \ M T() const { return MOCK_ANONYMOUS_HELPER(t)(); } \
MOCK_METHOD_HELPER(T(), t, BOOST_DEDUCED_TYPENAME) MOCK_METHOD_HELPER(T(), t, typename)
#define MOCK_NON_CONST_CONVERSION_OPERATOR_TPL(M, T, t) \ #define MOCK_NON_CONST_CONVERSION_OPERATOR_TPL(M, T, t) \
M T() { return MOCK_ANONYMOUS_HELPER(t)(); } \ M T() { return MOCK_ANONYMOUS_HELPER(t)(); } \
MOCK_METHOD_HELPER(T(), t, BOOST_DEDUCED_TYPENAME) MOCK_METHOD_HELPER(T(), t, typename)
#define MOCK_FUNCTION_HELPER(S, t, s, tpn) \ #define MOCK_FUNCTION_HELPER(S, t, s, tpn) \
s mock::detail::function< MOCK_FUNCTION_TYPE(S, tpn) >& t##_mock( \ s mock::detail::function< MOCK_FUNCTION_TYPE(S, tpn) >& t##_mock( \
@ -155,7 +155,7 @@
#define MOCK_CONSTRUCTOR(T, n, A, t) \ #define MOCK_CONSTRUCTOR(T, n, A, t) \
MOCK_CONSTRUCTOR_AUX(T, n, A, t,) MOCK_CONSTRUCTOR_AUX(T, n, A, t,)
#define MOCK_CONSTRUCTOR_TPL(T, n, A, t) \ #define MOCK_CONSTRUCTOR_TPL(T, n, A, t) \
MOCK_CONSTRUCTOR_AUX(T, n, A, t, BOOST_DEDUCED_TYPENAME) MOCK_CONSTRUCTOR_AUX(T, n, A, t, typename)
#define MOCK_DESTRUCTOR(T, t) \ #define MOCK_DESTRUCTOR(T, t) \
T() { try { MOCK_ANONYMOUS_HELPER(t)(); } catch( ... ) {} } \ T() { try { MOCK_ANONYMOUS_HELPER(t)(); } catch( ... ) {} } \
@ -218,7 +218,7 @@
MOCK_FUNCTION_AUX(F, n, \ MOCK_FUNCTION_AUX(F, n, \
MOCK_VARIADIC_ELEM_0(__VA_ARGS__), \ MOCK_VARIADIC_ELEM_0(__VA_ARGS__), \
MOCK_VARIADIC_ELEM_1(__VA_ARGS__, F), \ MOCK_VARIADIC_ELEM_1(__VA_ARGS__, F), \
static, BOOST_DEDUCED_TYPENAME) static, typename)
#else // MOCK_VARIADIC_MACROS #else // MOCK_VARIADIC_MACROS
@ -231,7 +231,7 @@
#define MOCK_STATIC_METHOD(F, n, S, t) \ #define MOCK_STATIC_METHOD(F, n, S, t) \
MOCK_FUNCTION_AUX(F, n, S, t, static,) MOCK_FUNCTION_AUX(F, n, S, t, static,)
#define MOCK_STATIC_METHOD_TPL(F, n, S, t) \ #define MOCK_STATIC_METHOD_TPL(F, n, S, t) \
MOCK_FUNCTION_AUX(F, n, S, t, static, BOOST_DEDUCED_TYPENAME) MOCK_FUNCTION_AUX(F, n, S, t, static, typename)
#endif // MOCK_VARIADIC_MACROS #endif // MOCK_VARIADIC_MACROS

View file

@ -36,8 +36,8 @@ namespace detail
boost::unit_test::const_string instance, boost::unit_test::const_string instance,
boost::optional< type_name > type, boost::optional< type_name > type,
boost::unit_test::const_string name, boost::unit_test::const_string name,
BOOST_DEDUCED_TYPENAME boost::disable_if< typename boost::disable_if<
BOOST_DEDUCED_TYPENAME boost::is_base_of< object, T > typename boost::is_base_of< object, T >
>::type* = 0 ) >::type* = 0 )
{ {
e.configure( detail::root, &t, instance, type, name ); e.configure( detail::root, &t, instance, type, name );