Refactoring to prevent ADL to pick up operator== for map iterators with certain compilers

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@442 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2012-04-13 14:55:38 +00:00
parent 1324ad0a35
commit 966c415953
4 changed files with 12 additions and 9 deletions

View file

@ -18,10 +18,10 @@
namespace mock
{
class verifiable;
namespace detail
{
class verifiable;
class context : boost::noncopyable
{
public:

View file

@ -139,7 +139,7 @@ namespace mock
}
private:
class function_impl : public verifiable
class function_impl : public detail::verifiable
{
public:
typedef MOCK_ERROR_POLICY< result_type > error_type;

View file

@ -33,10 +33,10 @@ namespace mock
{}
private:
class object_impl : public detail::context, private verifiable
class object_impl : public detail::context, private detail::verifiable
{
public:
virtual void add( const void* /*p*/, verifiable& v,
virtual void add( const void* /*p*/, detail::verifiable& v,
boost::unit_test::const_string instance,
const boost::optional< detail::type_name >& type,
boost::unit_test::const_string name )
@ -45,11 +45,11 @@ namespace mock
mock::detail::root.add( *this );
children_[ &v ].update( parent_, instance, type, name );
}
virtual void add( verifiable& v )
virtual void add( detail::verifiable& v )
{
group_.add( v );
}
virtual void remove( verifiable& v )
virtual void remove( detail::verifiable& v )
{
group_.remove( v );
children_.erase( &v );
@ -58,7 +58,7 @@ namespace mock
}
virtual void serialize( std::ostream& s,
const verifiable& v ) const
const detail::verifiable& v ) const
{
children_cit it = children_.find( &v );
if( it != children_.end() )
@ -77,7 +77,7 @@ namespace mock
}
private:
typedef std::map< const verifiable*, detail::child > children_t;
typedef std::map< const detail::verifiable*, detail::child > children_t;
typedef children_t::const_iterator children_cit;
detail::group group_;

View file

@ -13,6 +13,8 @@
#include <boost/noncopyable.hpp>
namespace mock
{
namespace detail
{
class verifiable : private boost::noncopyable
{
@ -25,5 +27,6 @@ namespace mock
virtual void reset() = 0;
};
}
}
#endif // MOCK_VERIFIABLE_HPP_INCLUDED