Skip to content

Commit

Permalink
Merge pull request #68 from Flamefire/mingw
Browse files Browse the repository at this point in the history
Undef small and near if defined
  • Loading branch information
mat007 authored Jan 2, 2019
2 parents 1b5d8c8 + c71fe6c commit 5c0f290
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions include/turtle/constraints.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ namespace detail

#endif // BOOST_VERSION < 105900

#ifdef BOOST_MSVC
#ifdef small
# pragma push_macro( "small" )
# undef small
# define MOCK_SMALL_DEFINED
#endif
MOCK_NARY_CONSTRAINT( small, 1, ( tolerance ),
( MOCK_SMALL() ) )
#ifdef BOOST_MSVC
#ifdef MOCK_SMALL_DEFINED
# pragma pop_macro( "small" )
#endif

Expand All @@ -96,13 +97,14 @@ namespace detail
#undef MOCK_PERCENT_TOLERANCE
#undef MOCK_FRACTION_TOLERANCE

#ifdef BOOST_MSVC
#ifdef near
# pragma push_macro( "near" )
# undef near
# define MOCK_NEAR_DEFINED
#endif
MOCK_NARY_CONSTRAINT( near, 2, ( expected, tolerance ),
std::abs( actual - expected ) < tolerance )
#ifdef BOOST_MSVC
#ifdef MOCK_NEAR_DEFINED
# pragma pop_macro( "near" )
#endif

Expand Down

0 comments on commit 5c0f290

Please sign in to comment.