mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-24 06:16:10 +01:00
Wrap all uses in min and max in extra parentheses
This prevents `min` and `max` macros from windows headers (!@#$) from breaking compilation. Related to #1191
This commit is contained in:
parent
b97e9a2f8b
commit
3fe4d394a5
@ -27,9 +27,9 @@ namespace Catch {
|
|||||||
result_type operator()( result_type n ) const { return std::rand() % n; }
|
result_type operator()( result_type n ) const { return std::rand() % n; }
|
||||||
|
|
||||||
#ifdef CATCH_CONFIG_CPP11_SHUFFLE
|
#ifdef CATCH_CONFIG_CPP11_SHUFFLE
|
||||||
static constexpr result_type min() { return 0; }
|
static constexpr result_type (min)() { return 0; }
|
||||||
static constexpr result_type max() { return 1000000; }
|
static constexpr result_type (max)() { return 1000000; }
|
||||||
result_type operator()() const { return std::rand() % max(); }
|
result_type operator()() const { return std::rand() % (max)(); }
|
||||||
#endif
|
#endif
|
||||||
template<typename V>
|
template<typename V>
|
||||||
static void shuffle( V& vector ) {
|
static void shuffle( V& vector ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user