mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Move the boost-deprecation-switch to the config.hpp
and use better naming
This commit is contained in:
parent
d140e31f6f
commit
f6f24a9c39
2 changed files with 13 additions and 12 deletions
|
|
@ -101,4 +101,13 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if BOOST_VERSION >= 107000
|
||||
# define MOCK_TYPEID( t ) BOOST_CORE_TYPEID(t)
|
||||
# define MOCK_TYPEINFO boost::core::typeinfo
|
||||
#else
|
||||
# define MOCK_TYPEID( t ) BOOST_SP_TYPEID(t)
|
||||
# define MOCK_TYPEINFO boost::detail::sp_typeinfo
|
||||
#endif
|
||||
|
||||
|
||||
#endif // MOCK_CONFIG_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -28,15 +28,7 @@
|
|||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
#if BOOST_VERSION >= 107000
|
||||
#define MOCK_TYPE_ID( t ) BOOST_CORE_TYPEID(t)
|
||||
#define TYPEINFO boost::core::typeinfo
|
||||
#else
|
||||
#define MOCK_TYPE_ID( t ) BOOST_SP_TYPEID(t)
|
||||
#define TYPEINFO boost::detail::sp_typeinfo
|
||||
#endif
|
||||
|
||||
#define MOCK_TYPE_NAME( t ) mock::detail::type_name( MOCK_TYPE_ID(t) )
|
||||
#define MOCK_TYPE_NAME( t ) mock::detail::type_name( MOCK_TYPEID(t) )
|
||||
|
||||
namespace mock
|
||||
{
|
||||
|
|
@ -45,7 +37,7 @@ namespace detail
|
|||
class type_name
|
||||
{
|
||||
public:
|
||||
explicit type_name( const TYPEINFO& info )
|
||||
explicit type_name( const MOCK_TYPEINFO& info )
|
||||
: info_( &info )
|
||||
{}
|
||||
friend std::ostream& operator<<( std::ostream& s, const type_name& t )
|
||||
|
|
@ -55,7 +47,7 @@ namespace detail
|
|||
}
|
||||
private:
|
||||
void serialize( std::ostream& s,
|
||||
const TYPEINFO& info ) const
|
||||
const MOCK_TYPEINFO& info ) const
|
||||
{
|
||||
const char* name = info.name();
|
||||
#ifdef __GNUC__
|
||||
|
|
@ -120,7 +112,7 @@ namespace detail
|
|||
return std::string::npos;
|
||||
}
|
||||
|
||||
const TYPEINFO* info_;
|
||||
const MOCK_TYPEINFO* info_;
|
||||
};
|
||||
}
|
||||
} // mock
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue