29#ifndef RW_ALG_TEST_H_INCLUDED
30#define RW_ALG_TEST_H_INCLUDED
57template <
class InputIterator,
class Predicate>
65 if (pred (*first, *prev))
74template <
class InputIterator>
91template <
class InputIterator>
115#if !defined (_MSC_VER) || _MSC_VER > 1300
123 return val_ ? &conv_to_bool::val_ :
UniquePtr (0);
138 void operator!()
const;
210template <
int c = no_ctor>
225 void operator= (
base&);
236 void operator= (
base&);
254 void operator= (
base&);
272 void operator= (
base&);
322template <
class T,
class U>
331template <
class T,
class U>
334 operator const U& ()
const {
342template <
class IntegralT>
353 operator IntegralT ()
const {
return val_; }
357 void operator= (
const Size&);
364#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
368# define ITER_BASE(ign1, ign2, ign3, ign4, ign5) DummyBase
371# define ITER_BASE(Cat, T, Dist, Ptr, Ref) \
372 std::iterator<Cat, T, Dist, Ptr, Ref >
398 : cur_ (
cur), beg_ (beg), end_ (
end), ref_ (1) {
399 RW_ASSERT (beg_ <= cur_ && cur_ <= end_);
403 cur_ = beg_ = end_ = 0;
409 void operator= (
const Shared&);
427 return !(*
this ==
rhs);
476 : ptr_ (
rhs.ptr_), cur_ (
rhs.cur_)
489 if (0 == --ptr_->ref_)
505 if (0 == --ptr_->ref_)
534 return cur_ ==
rhs.cur_;
560 : cur_ (
cur), assign_ (
cur), begin_ (
cur), end_ (
end), ref_ (1) { }
563 begin_ = end_ = cur_ = assign_ = 0;
569 void operator= (
const Shared&);
658 if (0 == --ptr_->ref_)
673 if (0 == --ptr_->ref_)
722 return !(*
this ==
rhs);
734 return ++
cur_, *
this;
806 return !(*
this ==
rhs);
818 return ++
cur_, *
this;
828 return --
cur_, *
this;
868 :
ITER_BASE (std::random_access_iterator_tag, T, int, T*, T&)
906 return ++
cur_, *
this;
916 return --
cur_, *
this;
928 return cur_ +=
n, *
this;
953 return !(*
this ==
rhs);
966 return !(
rhs < *
this);
970 return !(*
this <
rhs);
1047{
return "InputIterator"; }
1066{
return "OutputIterator"; }
1085{
return "ForwardIterator"; }
1104{
return "ConstForwardIterator"; }
1123{
return "BidirectionalIterator"; }
1142{
return "ConstBidirectionalIterator"; }
1161{
return "RandomAccessIterator"; }
1181{
return "ConstRandomAccessIterator"; }
const minus< T > & operator-(const minus< T > &lhs, const minus< T > &rhs)
const plus_asgn< T > & operator*(const plus_asgn< T > &lhs, const plus_asgn< T > &rhs)
void operator+(typename A< T >::I, const A< T > &)
#define _RWSTD_REINTERPRET_CAST(T, x)
#define _RWSTD_UNUSED(arg)
#define _RWSTD_CONST_CAST(T, x)
bool operator>(const DistancePair &lhs, const DistancePair &rhs)
bool operator==(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
bool operator<(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
bool operator<(const lt_comp< T > &, const lt_comp< T > &)
bool operator==(const eq_comp< T > &, const eq_comp< T > &)
_TEST_EXPORT int gen_seq()
T * make_iter(T *cur, const T *, const T *, T *)
void operator&&(const conv_to_bool &, bool)
void operator||(const conv_to_bool &, bool)
_TEST_EXPORT unsigned ilog10(_RWSTD_SIZE_T)
#define ITER_BASE(ign1, ign2, ign3, ign4, ign5)
_TEST_EXPORT unsigned ilog2(_RWSTD_SIZE_T)
bool is_sorted_gt(InputIterator first, InputIterator last)
bool is_sorted_lt(InputIterator first, InputIterator last)
T * copy_iter(T *ptr, const T *)
_TEST_EXPORT int gen_rnd()
_TEST_EXPORT int gen_seq_2lists()
_TEST_EXPORT int gen_subseq()
bool is_sorted(InputIterator first, InputIterator last, Predicate pred)
BidirIter(pointer cur, const value_type *begin, const value_type *end)
bool operator==(const BidirIter &rhs) const
reference operator*() const
const value_type * begin_
bool operator!=(const BidirIter &rhs) const
_RWSTD_PTRDIFF_T difference_type
std::bidirectional_iterator_tag iterator_category
BidirIter(const BidirIter &rhs)
_RWSTD_OPERATOR_ARROW(pointer operator->() const)
BidirIter & operator=(const BidirIter &rhs)
const value_type & operator*() const
BidirIter< const value_type > Base
ConstBidirIter(const value_type *cur, const value_type *begin, const value_type *end)
_RWSTD_OPERATOR_ARROW(const value_type *operator->() const)
FwdIter< const value_type > Base
ConstFwdIter(const value_type *cur, const value_type *begin, const value_type *end)
_RWSTD_OPERATOR_ARROW(const value_type *operator->() const)
const value_type & operator*() const
const value_type & operator*() const
const value_type & operator[](difference_type inx) const
ConstRandomAccessIter(const value_type *cur, const value_type *begin, const value_type *end)
RandomAccessIter< const value_type > Base
Base::difference_type difference_type
_RWSTD_OPERATOR_ARROW(const value_type *operator->() const)
FwdIter(pointer cur, const value_type *, const value_type *end)
_RWSTD_OPERATOR_ARROW(pointer operator->() const)
_RWSTD_PTRDIFF_T difference_type
bool operator!=(const FwdIter &rhs) const
std::forward_iterator_tag iterator_category
FwdIter(const FwdIter &rhs)
FwdIter & operator=(const FwdIter &rhs)
reference operator*() const
bool operator==(const FwdIter &rhs) const
Shared(pointer cur, const value_type *end)
const value_type * begin_
_RWSTD_PTRDIFF_T difference_type
OutputIter(pointer cur, const value_type *, const value_type *end)
_RWSTD_OPERATOR_ARROW(pointer operator->() const)
OutputIter(const OutputIter &rhs)
std::output_iterator_tag iterator_category
RandomAccessIter(const RandomAccessIter &rhs)
_RWSTD_OPERATOR_ARROW(pointer operator->() const)
reference operator*() const
reference operator[](difference_type inx) const
const value_type * begin_
std::random_access_iterator_tag iterator_category
_RWSTD_PTRDIFF_T difference_type
RandomAccessIter(pointer cur, const value_type *begin, const value_type *end)
assign & operator=(const assign &rhs)
base(const base< cpy_ctor > &rhs)
base(const base<(def_ctor|cpy_ctor)> &rhs)
reference operator()(const argument_type &, const argument_type &) const
argument_type & reference
conv_to_bool operator()(const T &a, const T &b) const
static conv_to_bool make(bool val)
bool conv_to_bool::* UniquePtr
argument_type & reference
reference operator()(const argument_type &) const
conv_to_bool operator()(const T &a) const