mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-04 15:24:29 +02:00
stripped down implementation for Borland
[SVN r16531]
This commit is contained in:
@@ -15,18 +15,19 @@
|
|||||||
// without express or implied warranty.
|
// without express or implied warranty.
|
||||||
|
|
||||||
#include "boost/mpl/lower_bound.hpp"
|
#include "boost/mpl/lower_bound.hpp"
|
||||||
|
#include "boost/mpl/distance.hpp"
|
||||||
#include "boost/mpl/list_c.hpp"
|
#include "boost/mpl/list_c.hpp"
|
||||||
#include "boost/mpl/comparison/less.hpp"
|
#include "boost/mpl/comparison/less.hpp"
|
||||||
#include "boost/mpl/int_c.hpp"
|
#include "boost/mpl/int_c.hpp"
|
||||||
#include "boost/static_assert.hpp"
|
#include "boost/static_assert.hpp"
|
||||||
|
|
||||||
namespace mpl = boost::mpl;
|
namespace mpl = boost::mpl;
|
||||||
using mpl::_;
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
typedef mpl::list_c<int,1,2,3,3,3,5,8> numbers;
|
typedef mpl::list_c<int,1,2,3,3,3,5,8> 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<numbers>::type,iter >::type::value == 2));
|
BOOST_STATIC_ASSERT((mpl::distance< mpl::begin<numbers>::type,iter >::type::value == 2));
|
||||||
|
BOOST_STATIC_ASSERT(iter::type::value == 3);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -15,21 +15,19 @@
|
|||||||
// without express or implied warranty.
|
// without express or implied warranty.
|
||||||
|
|
||||||
#include "boost/mpl/upper_bound.hpp"
|
#include "boost/mpl/upper_bound.hpp"
|
||||||
|
#include "boost/mpl/distance.hpp"
|
||||||
#include "boost/mpl/list_c.hpp"
|
#include "boost/mpl/list_c.hpp"
|
||||||
#include "boost/mpl/comparison/less.hpp"
|
#include "boost/mpl/comparison/less.hpp"
|
||||||
#include "boost/mpl/int_c.hpp"
|
#include "boost/mpl/int_c.hpp"
|
||||||
#include "boost/mpl/distance.hpp"
|
|
||||||
#include "boost/static_assert.hpp"
|
#include "boost/static_assert.hpp"
|
||||||
|
|
||||||
namespace mpl = boost::mpl;
|
namespace mpl = boost::mpl;
|
||||||
using mpl::_;
|
|
||||||
|
|
||||||
#define N 50
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
typedef mpl::list_c<int,1,2,3,3,3,5,8> numbers;
|
typedef mpl::list_c<int,1,2,3,3,3,5,8> 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<numbers>::type,iter >::type::value == 5));
|
BOOST_STATIC_ASSERT((mpl::distance< mpl::begin<numbers>::type,iter >::type::value == 5));
|
||||||
|
BOOST_STATIC_ASSERT(iter::type::value == 5);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user