mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Undef small and near if defined
Not only happens on MSVC but also on MinGW (and probably all windows builds)
This commit is contained in:
parent
1b5d8c84ef
commit
c71fe6c912
1 changed files with 6 additions and 4 deletions
|
|
@ -77,13 +77,14 @@ namespace detail
|
||||||
|
|
||||||
#endif // BOOST_VERSION < 105900
|
#endif // BOOST_VERSION < 105900
|
||||||
|
|
||||||
#ifdef BOOST_MSVC
|
#ifdef small
|
||||||
# pragma push_macro( "small" )
|
# pragma push_macro( "small" )
|
||||||
# undef small
|
# undef small
|
||||||
|
# define MOCK_SMALL_DEFINED
|
||||||
#endif
|
#endif
|
||||||
MOCK_NARY_CONSTRAINT( small, 1, ( tolerance ),
|
MOCK_NARY_CONSTRAINT( small, 1, ( tolerance ),
|
||||||
( MOCK_SMALL() ) )
|
( MOCK_SMALL() ) )
|
||||||
#ifdef BOOST_MSVC
|
#ifdef MOCK_SMALL_DEFINED
|
||||||
# pragma pop_macro( "small" )
|
# pragma pop_macro( "small" )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -96,13 +97,14 @@ namespace detail
|
||||||
#undef MOCK_PERCENT_TOLERANCE
|
#undef MOCK_PERCENT_TOLERANCE
|
||||||
#undef MOCK_FRACTION_TOLERANCE
|
#undef MOCK_FRACTION_TOLERANCE
|
||||||
|
|
||||||
#ifdef BOOST_MSVC
|
#ifdef near
|
||||||
# pragma push_macro( "near" )
|
# pragma push_macro( "near" )
|
||||||
# undef near
|
# undef near
|
||||||
|
# define MOCK_NEAR_DEFINED
|
||||||
#endif
|
#endif
|
||||||
MOCK_NARY_CONSTRAINT( near, 2, ( expected, tolerance ),
|
MOCK_NARY_CONSTRAINT( near, 2, ( expected, tolerance ),
|
||||||
std::abs( actual - expected ) < tolerance )
|
std::abs( actual - expected ) < tolerance )
|
||||||
#ifdef BOOST_MSVC
|
#ifdef MOCK_NEAR_DEFINED
|
||||||
# pragma pop_macro( "near" )
|
# pragma pop_macro( "near" )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue