Fixed constraint helpers to be usable in any namespace

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@644 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2013-05-12 08:58:49 +00:00
parent d2fbf4167b
commit 4faf23b2b1

View file

@ -18,6 +18,8 @@ namespace mock
template< typename Constraint >
struct constraint
{
constraint()
{}
constraint( const Constraint& c )
: c_( c )
{}
@ -133,14 +135,7 @@ namespace detail
} \
}; \
} \
template<> \
struct constraint< detail::N > \
{ \
constraint() \
{} \
detail::N c_; \
}; \
const constraint< detail::N > N;
const mock::constraint< detail::N > N;
#define MOCK_BINARY_CONSTRAINT(N,Expr) \
namespace detail \
@ -170,7 +165,7 @@ namespace detail
}; \
} \
template< typename T > \
constraint< detail::N< T > > N( T t ) \
mock::constraint< detail::N< T > > N( T t ) \
{ \
return detail::N< T >( t ); \
}