mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 20:05:31 +00:00
Merge pull request #7 from g40/stdmin
Parenthesize std::min for windows.h macro collision avoidance.
This commit is contained in:
commit
862740079e
2
peglib.h
2
peglib.h
@ -256,7 +256,7 @@ private:
|
||||
template <typename F>
|
||||
auto transform(size_t beg, size_t end, F f) const -> vector<typename std::remove_const<decltype(f(SemanticValue()))>::type> {
|
||||
vector<typename std::remove_const<decltype(f(SemanticValue()))>::type> r;
|
||||
end = std::min(end, size());
|
||||
end = (std::min)(end, size());
|
||||
for (size_t i = beg; i < end; i++) {
|
||||
r.emplace_back(f((*this)[i]));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user