1// (C) Copyright John Maddock 2001. 2// Use, modification and distribution are subject to the 3// Boost Software License, Version 1.0. (See accompanying file 4// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6// See http://www.boost.org/libs/config for the most recent version. 7 8// MACRO: BOOST_NO_STD_MIN_MAX 9// TITLE: std::min and std::max 10// DESCRIPTION: The C++ standard library does not provide 11// the (min)() and (max)() template functions that 12// should be in <algorithm>. 13 14#include <algorithm> 15 16namespace boost_no_std_min_max{ 17 18 19int test() 20{ 21 int i = 0; 22 int j = 2; 23 if((std::min)(i,j) != 0) return -1; 24 if((std::max)(i,j) != 2) return -1; 25 26 return 0; 27} 28 29} 30 31 32 33 34