mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Update for C++17 and fix MSVC warnings (#1694)
* Update MSVC arguments * Fix json allocator * Fix simulation diamond * Bump gtest * Remove empty varargs in unit tests * Replace test case with test suite * Remove deprecation warning in optional * Remove need for NOMIXMAX to be defined in wpilib headers
This commit is contained in:
committed by
Peter Johnson
parent
fb1239a2ad
commit
221011494d
@@ -1310,7 +1310,7 @@ template <typename R> struct result_pair {
|
||||
ValueOfRange<R> &value() { return *Iter; }
|
||||
|
||||
private:
|
||||
std::size_t Index = std::numeric_limits<std::size_t>::max();
|
||||
std::size_t Index = (std::numeric_limits<std::size_t>::max)();
|
||||
IterOfRange<R> Iter;
|
||||
};
|
||||
|
||||
@@ -1325,7 +1325,7 @@ class enumerator_iter
|
||||
|
||||
public:
|
||||
explicit enumerator_iter(IterOfRange<R> EndIter)
|
||||
: Result(std::numeric_limits<size_t>::max(), EndIter) {}
|
||||
: Result((std::numeric_limits<size_t>::max)(), EndIter) {}
|
||||
|
||||
enumerator_iter(std::size_t Index, IterOfRange<R> Iter)
|
||||
: Result(Index, Iter) {}
|
||||
@@ -1334,7 +1334,7 @@ public:
|
||||
const result_type &operator*() const { return Result; }
|
||||
|
||||
enumerator_iter<R> &operator++() {
|
||||
assert(Result.Index != std::numeric_limits<size_t>::max());
|
||||
assert(Result.Index != (std::numeric_limits<size_t>::max)());
|
||||
++Result.Iter;
|
||||
++Result.Index;
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user