mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Replace Boost.TypeTraits by std equivalents
This commit is contained in:
parent
9e664b52ab
commit
df5b77af95
13 changed files with 76 additions and 113 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
// static
|
||||
|
||||
|
|
@ -23,14 +24,10 @@ namespace
|
|||
{
|
||||
boost::function< void() > static_f;
|
||||
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same< void, boost::result_of< mock::detail::function< void() >() >::type > ));
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same< int, boost::result_of< mock::detail::function< int() >() >::type > ));
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same< void, boost::result_of< mock::detail::function< void( float ) >( float ) >::type > ));
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same< int, boost::result_of< mock::detail::function< int( float ) >( float ) >::type > ));
|
||||
static_assert( std::is_same< void, boost::result_of< mock::detail::function< void() >() >::type >::value, "!");
|
||||
static_assert( std::is_same< int, boost::result_of< mock::detail::function< int() >() >::type >::value, "!");
|
||||
static_assert( std::is_same< void, boost::result_of< mock::detail::function< void( float ) >( float ) >::type >::value, "!");
|
||||
static_assert( std::is_same< int, boost::result_of< mock::detail::function< int( float ) >( float ) >::type >::value, "!");
|
||||
}
|
||||
|
||||
// functor
|
||||
|
|
|
|||
|
|
@ -143,11 +143,7 @@ BOOST_AUTO_TEST_CASE( class_with_sig_is_functor )
|
|||
BOOST_AUTO_TEST_CASE( cxx11_lambda_is_functor )
|
||||
{
|
||||
is_not_functor( []() {} );
|
||||
#ifdef MOCK_DECLTYPE
|
||||
is_functor( []( int ) {} );
|
||||
#else
|
||||
is_not_functor( []( int ) {} );
|
||||
#endif
|
||||
is_not_functor( []( const std::string&, int ) {} );
|
||||
is_not_functor( []( int, const std::string& ) {} );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <turtle/detail/signature.hpp>
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
@ -22,8 +22,6 @@ namespace
|
|||
|
||||
BOOST_AUTO_TEST_CASE( mock_signature_generates_signature )
|
||||
{
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same< void(), MOCK_SIGNATURE(method_1) > ));
|
||||
BOOST_MPL_ASSERT((
|
||||
boost::is_same< float( int ), MOCK_SIGNATURE(method_2) > ));
|
||||
static_assert( std::is_same< void(), MOCK_SIGNATURE(method_1) >::value, "!");
|
||||
static_assert( std::is_same< float( int ), MOCK_SIGNATURE(method_2) >::value, "!");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue