Skip to content

Commit 5c0f290

Browse files
authored
Merge pull request #68 from Flamefire/mingw
Undef small and near if defined
2 parents 1b5d8c8 + c71fe6c commit 5c0f290

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

include/turtle/constraints.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,14 @@ namespace detail
7777

7878
#endif // BOOST_VERSION < 105900
7979

80-
#ifdef BOOST_MSVC
80+
#ifdef small
8181
# pragma push_macro( "small" )
8282
# undef small
83+
# define MOCK_SMALL_DEFINED
8384
#endif
8485
MOCK_NARY_CONSTRAINT( small, 1, ( tolerance ),
8586
( MOCK_SMALL() ) )
86-
#ifdef BOOST_MSVC
87+
#ifdef MOCK_SMALL_DEFINED
8788
# pragma pop_macro( "small" )
8889
#endif
8990

@@ -96,13 +97,14 @@ namespace detail
9697
#undef MOCK_PERCENT_TOLERANCE
9798
#undef MOCK_FRACTION_TOLERANCE
9899

99-
#ifdef BOOST_MSVC
100+
#ifdef near
100101
# pragma push_macro( "near" )
101102
# undef near
103+
# define MOCK_NEAR_DEFINED
102104
#endif
103105
MOCK_NARY_CONSTRAINT( near, 2, ( expected, tolerance ),
104106
std::abs( actual - expected ) < tolerance )
105-
#ifdef BOOST_MSVC
107+
#ifdef MOCK_NEAR_DEFINED
106108
# pragma pop_macro( "near" )
107109
#endif
108110

0 commit comments

Comments
 (0)