#define _CRT_SECURE_NO_DEPRECATE
#define _SCL_SECURE_NO_DEPRECATE
#include <boost/config.hpp>
#include <string>
#include <iostream>
#include <boost/bimap/bimap.hpp>
#include <boost/bimap/support/lambda.hpp>
using namespace boost::bimaps;
void using_upper_and_lower_bound()
{
typedef bimap<int,std::string> bm_type;
bm_type bm;
bm_type::left_iterator iter_first = bm.left.lower_bound(20);
bm_type::left_iterator iter_second = bm.left.upper_bound(50);
{
bm_type::left_iterator iter_first = bm.left.upper_bound(20);
bm_type::left_iterator iter_second = bm.left.lower_bound(50);
}
}
void using_range()
{
typedef bimap<int,std::string> bm_type;
bm_type bm;
bm_type::left_range_type r;
r = bm.left.range( 20 <= _key, _key <= 50 );
r = bm.left.range( 20 < _key, _key < 50 );
r = bm.left.range( 20 <= _key, _key < 50 );
r = bm.left.range( 20 <= _key, unbounded );
r = bm.left.range( unbounded , _key < 50 );
r = bm.left.range( unbounded , unbounded ); }
int main()
{
using_upper_and_lower_bound();
using_range();
return 0;
}