From 99e829138f6dd1150bf8f9d9a4c13acd7a248842 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Sun, 8 Dec 2002 08:08:01 +0000 Subject: [PATCH] stripped down implementation for Borland [SVN r16531] --- test/lower_bound.cpp | 5 +++-- test/upper_bound.cpp | 8 +++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/test/lower_bound.cpp b/test/lower_bound.cpp index de11944..523e8a9 100644 --- a/test/lower_bound.cpp +++ b/test/lower_bound.cpp @@ -15,18 +15,19 @@ // without express or implied warranty. #include "boost/mpl/lower_bound.hpp" +#include "boost/mpl/distance.hpp" #include "boost/mpl/list_c.hpp" #include "boost/mpl/comparison/less.hpp" #include "boost/mpl/int_c.hpp" #include "boost/static_assert.hpp" namespace mpl = boost::mpl; -using mpl::_; int main() { typedef mpl::list_c numbers; - typedef mpl::lower_bound< numbers, mpl::int_c<3>, mpl::less<_,_> >::type iter; + typedef mpl::lower_bound< numbers, mpl::int_c<3> >::type iter; BOOST_STATIC_ASSERT((mpl::distance< mpl::begin::type,iter >::type::value == 2)); + BOOST_STATIC_ASSERT(iter::type::value == 3); return 0; } diff --git a/test/upper_bound.cpp b/test/upper_bound.cpp index bd37e6d..00b7e19 100644 --- a/test/upper_bound.cpp +++ b/test/upper_bound.cpp @@ -15,21 +15,19 @@ // without express or implied warranty. #include "boost/mpl/upper_bound.hpp" +#include "boost/mpl/distance.hpp" #include "boost/mpl/list_c.hpp" #include "boost/mpl/comparison/less.hpp" #include "boost/mpl/int_c.hpp" -#include "boost/mpl/distance.hpp" #include "boost/static_assert.hpp" namespace mpl = boost::mpl; -using mpl::_; - -#define N 50 int main() { typedef mpl::list_c numbers; - typedef mpl::upper_bound< numbers, mpl::int_c<3>, mpl::less<_,_> >::type iter; + typedef mpl::upper_bound< numbers, mpl::int_c<3> >::type iter; BOOST_STATIC_ASSERT((mpl::distance< mpl::begin::type,iter >::type::value == 5)); + BOOST_STATIC_ASSERT(iter::type::value == 5); return 0; }