mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Wrapped constraints parameters with boost::addressof where needed in order to support types with overloaded operator&
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@385 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
7fc80c1035
commit
db36244dfc
2 changed files with 60 additions and 41 deletions
|
|
@ -312,3 +312,21 @@ BOOST_AUTO_TEST_CASE( contain_with_strings )
|
|||
BOOST_CHECK( ! c.f_( std::string( "this is a string" ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
struct type_with_overloaded_address_operator
|
||||
{
|
||||
void operator&() {}
|
||||
void operator&() const {}
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( type_with_overloaded_address_operator_can_be_used_in_constraints )
|
||||
{
|
||||
type_with_overloaded_address_operator t;
|
||||
mock::same( t ).f_( t );
|
||||
mock::retrieve( t ).f_( t );
|
||||
type_with_overloaded_address_operator* pt;
|
||||
mock::retrieve( pt ).f_( t );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue