Merge pull request #7 from g40/stdmin

Parenthesize std::min for windows.h macro collision avoidance.
This commit is contained in:
yhirose 2015-11-26 12:08:30 -05:00
commit 862740079e

View File

@ -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]));
}