Skip to content

Commit 9d70971

Browse files
author
Eric Niebler
committed
remove std_min and std_max, update minmax coding guidelines
[SVN r23162]
1 parent c658759 commit 9d70971

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

include/boost/python/slice.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ class slice : public object
143143
throw std::invalid_argument( "Zero-length slice");
144144
if (i >= 0) {
145145
ret.start = begin;
146-
std::advance( ret.start, std_min(i, max_dist-1));
146+
BOOST_USING_STD_MIN();
147+
std::advance( ret.start, min BOOST_PREVENT_MACRO_SUBSTITUTION(i, max_dist-1));
147148
}
148149
else {
149150
if (i < -max_dist && ret.step < 0)
@@ -187,7 +188,8 @@ class slice : public object
187188

188189
if (i > 0) {
189190
ret.stop = begin;
190-
std::advance( ret.stop, std_min( i-1, max_dist-1));
191+
BOOST_USING_STD_MIN();
192+
std::advance( ret.stop, min BOOST_PREVENT_MACRO_SUBSTITUTION( i-1, max_dist-1));
191193
}
192194
else { // i is negative, but not more negative than -max_dist
193195
ret.stop = end;

src/object/class.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include <boost/python/self.hpp>
2222
#include <boost/python/dict.hpp>
2323
#include <boost/python/str.hpp>
24-
#include <boost/minmax.hpp>
2524
#include <functional>
2625
#include <vector>
2726
#include <cstddef>
@@ -482,7 +481,7 @@ namespace objects
482481
// Build a tuple of the base Python type objects. If no bases
483482
// were declared, we'll use our class_type() as the single base
484483
// class.
485-
std::size_t const num_bases = std_max(num_types - 1, static_cast<std::size_t>(1));
484+
std::size_t const num_bases = (std::max)(num_types - 1, static_cast<std::size_t>(1));
486485
handle<> bases(PyTuple_New(num_bases));
487486

488487
for (std::size_t i = 1; i <= num_bases; ++i)

0 commit comments

Comments
 (0)