mirror of
https://github.com/boostorg/utility.git
synced 2025-05-08 18:34:02 +00:00
Fixes for Borland
[SVN r12254]
This commit is contained in:
parent
eb3c3435d7
commit
1bf28b3de2
@ -27,7 +27,9 @@
|
|||||||
#include <climits>
|
#include <climits>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <boost/tuple/tuple.hpp>
|
#ifndef __BORLANDC__
|
||||||
|
# include <boost/tuple/tuple.hpp>
|
||||||
|
#endif
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -72,8 +74,12 @@ void category_test(
|
|||||||
|
|
||||||
// Try some binary searches on the range to show that it's ordered
|
// Try some binary searches on the range to show that it's ordered
|
||||||
assert(std::binary_search(start, finish, *internal));
|
assert(std::binary_search(start, finish, *internal));
|
||||||
CountingIterator x,y;
|
|
||||||
boost::tie(x,y) = std::equal_range(start, finish, *internal);
|
// #including tuple crashed borland, so I had to give up on tie().
|
||||||
|
std::pair<CountingIterator,CountingIterator> xy(
|
||||||
|
std::equal_range(start, finish, *internal));
|
||||||
|
CountingIterator x = xy.first, y = xy.second;
|
||||||
|
|
||||||
assert(boost::detail::distance(x, y) == 1);
|
assert(boost::detail::distance(x, y) == 1);
|
||||||
|
|
||||||
// Show that values outside the range can't be found
|
// Show that values outside the range can't be found
|
||||||
|
Loading…
x
Reference in New Issue
Block a user