git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@289 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2011-04-09 20:58:03 +00:00
parent 79139f2047
commit 0b329e4aed
2 changed files with 8 additions and 6 deletions

View file

@ -29,7 +29,7 @@ namespace detail
{ {
boost::require_boolean_expr( boost::require_boolean_expr(
// if an error is generated by the line below it means // if an error is generated by the line below it means
// an argument passed to 'with' was of the wrong type. // an argument passed to 'with' was of the wrong type
functor_accepts( actual_argument_type ) functor_accepts( actual_argument_type )
); );
} }
@ -47,7 +47,7 @@ namespace detail
{ {
boost::require_boolean_expr( boost::require_boolean_expr(
// if an error is generated by the line below it means // if an error is generated by the line below it means
// an argument passed to 'with' was of the wrong type. // an argument passed to 'with' was of the wrong type
actual_argument_type == expected_argument_type actual_argument_type == expected_argument_type
); );
} }

View file

@ -65,8 +65,9 @@ namespace detail3
{} {}
virtual void serialize( std::ostream& s ) const virtual void serialize( std::ostream& s ) const
{ {
// if it fails here because ambiguous stuff // if an error about an ambiguous conversion is generated by the
// -> add operator<< to mock::stream for T // line below it means the easiest solution is likely to be to add
// a serialization operator to a mock::stream for T
s << *t_; s << *t_;
} }
const T* t_; const T* t_;
@ -121,8 +122,9 @@ namespace detail2
template< typename T > template< typename T >
void serialize( stream& s, const T& t ) void serialize( stream& s, const T& t )
{ {
// if it fails here because ambiguous stuff // if an error about an ambiguous conversion is generated by the
// -> add operator<< to mock::stream for T // line below it means the easiest solution is likely to be to add
// a serialization operator to a mock::stream for T
s << t; s << t;
} }
inline void serialize( stream& s, bool b ) inline void serialize( stream& s, bool b )