20# if defined (EH_NEW_HEADERS)
44template <
class C,
class Iter>
57template <
class C,
class Iter>
64template <
class C,
class Iter>
72template <
class C,
class Iter,
class KeyOfValue>
78 Iter lastNew,
const KeyOfValue& keyOfValue )
80 typedef typename C::key_type
key;
81 typedef typename C::const_iterator const_iter;
82 typedef EH_STD::vector<key> key_list;
83 typedef typename key_list::iterator key_iterator;
92 for ( Iter
x = firstNew;
x != lastNew; ++
x )
93 keys.push_back( keyOfValue(*
x) );
95 EH_STD::sort( keys.begin(), keys.end() );
96 key_iterator
last = EH_STD::unique( keys.begin(), keys.end() );
99 for ( key_iterator tmp = keys.begin(); tmp !=
last; ++tmp )
101 if ( const_iter(original.find( *tmp )) == const_iter(original.end()) )
107#if ! defined (__SGI_STL)
114# if ! defined (__KCC)
115template <
class _Pair>
117 const typename _Pair::first_type&
operator()(
const _Pair& __x)
const {
125template <
class C,
class Iter>
129 typedef typename C::value_type value_type;
131 EH_STD::identity<value_type>() );
134template <
class C,
class Iter>
138#ifdef EH_MULTI_CONST_TEMPLATE_ARG_BUG
140 EH_SELECT1ST_HINT<C::value_type, C::key_type>() );
142 typedef typename C::value_type value_type;
144 EH_STD::select1st<value_type>() );
148template <
class C,
class Iter>
156template <
class C,
class Iter>
164template <
class C,
class SrcIter>
166 const SrcIter& firstNew,
const SrcIter& lastNew,
169 typedef typename C::const_iterator DstIter;
170 DstIter first1 = original.begin();
171 DstIter first2 =
result.begin();
173 DstIter* from_orig =
new DstIter[original.size()];
174 DstIter* last_from_orig = from_orig;
177 while ( first2 !=
result.end() )
179 EH_STD::pair<DstIter, DstIter>
p = EH_STD::mismatch( first1, original.end(), first2 );
180 if (
p.second !=
result.end() )
182 SrcIter srcItem = EH_STD::find( SrcIter(firstNew), SrcIter(lastNew), *
p.second );
184 if (srcItem == lastNew)
188 tmp = EH_STD::find( from_orig, last_from_orig,
p.first );
191 if (tmp != last_from_orig)
193 EH_STD::copy(tmp+1, last_from_orig, tmp);
200 dstItem = EH_STD::find( first1, original.end(), *
p.first );
202 *last_from_orig = dstItem;
217template <
class C,
class SrcIter>
219 const C& original,
const C&
result,
const SrcIter& firstNew,
220 const SrcIter& lastNew,
size_t,
set_tag )
226template <
class C,
class SrcIter>
228 const SrcIter& firstNew,
const SrcIter& lastNew,
235template <
class C,
class SrcIter>
237 const C& original,
const C&
result,
const SrcIter& firstNew,
238 const SrcIter& lastNew,
size_t,
map_tag )
244template <
class C,
class SrcIter>
246 const C& original,
const C&
result,
const SrcIter& firstNew,
253template <
class C,
class SrcIter>
256 const C& original,
const C&
result, SrcIter firstNew,
259 const C& original,
const C&
result,
const SrcIter& firstNew,
263 typename C::const_iterator p1 = original.begin();
264 typename C::const_iterator p2 =
result.begin();
265 SrcIter tmp(firstNew);
267 for (
size_t n = 0;
n < insPos;
n++, ++p1, ++p2)
270 for (; tmp != lastNew; ++p2, ++tmp ) {
275 for (; p2 !=
result.end(); ++p1, ++p2 )
280template <
class C,
class SrcIter>
282 const SrcIter& firstNew,
283 const SrcIter& lastNew,
size_t insPos )
292template <
class C,
class Value>
296 typename C::const_iterator p1 = original.begin();
297 typename C::const_iterator p2 =
result.begin();
300 for (
size_t n = 0;
n < insPos;
n++ )
303 while ( insCnt-- > 0 )
310 while ( p2 !=
result.end() ) {
349 typename C::iterator
pos =
c.begin();
350 EH_STD::advance(
pos,
size_t(
fPos) );
386 typename C::iterator
pos =
c.begin();
450template <
class C,
class Position,
class Iter>
454 typedef typename C::iterator CIter;
455 CIter
pos = c_inst.begin();
460template <
class C,
class Position,
class Iter>
467template <
class C,
class Position,
class Iter>
473template <
class C,
class Position,
class Iter>
479template <
class C,
class Position,
class Iter>
485template <
class C,
class Position,
class Iter>
496template <
class C,
class Iter>
534template <
class C,
class Iter>
540template <
class C,
class Iter>
546template <
class C,
class Iter>
#define EH_BEGIN_NAMESPACE
#define EH_DISTANCE(a, b, result)
GLint GLint GLint GLint GLint x
GLboolean GLboolean GLboolean b
TestController gTestController
unsigned random_number(size_t range)
static void SetCurrentTestName(const char *str)
static void CancelFailureCountdown()
const T & operator()(const T &x) const
const _Pair::first_type & operator()(const _Pair &__x) const
void operator()(C &c) const
test_insert_n(const C &orig, size_t insCnt, int pos=-1)
void operator()(C &c) const
test_insert_noresize(const C &orig)
test_insert_one(const C &orig, int pos=-1)
void operator()(C &c) const
void operator()(C &c) const
test_insert_range(const C &orig, Iter first, Iter last, int pos=-1)
void operator()(C &c) const
test_insert_value(const C &orig)
sequence_container_tag container_category(const BitVector &)
EH_END_NAMESPACE size_t CountUniqueItems(const C &original, const Iter &firstNew, const Iter &lastNew, set_tag)
void do_insert_range(C &c_inst, Position offset, Iter first, Iter last, sequence_container_tag)
test_insert_range< C, Iter > insert_range_tester(const C &orig, const Iter &first, const Iter &last)
size_t CountNewItems(const C &, const Iter &firstNew, const Iter &lastNew, sequence_container_tag)
void VerifyInsertN(const C &original, const C &result, size_t insCnt, const Value &val, size_t insPos)
void VerifyInsertion(const C &original, const C &result, const SrcIter &firstNew, const SrcIter &lastNew, size_t, associative_container_tag)
test_insert_range< C, Iter > insert_range_at_begin_tester(const C &orig, const Iter &first, const Iter &last)
size_t CountUniqueItems_Aux(const C &original, Iter firstNew, Iter lastNew, const KeyOfValue &keyOfValue)
test_insert_range< C, Iter > insert_range_at_end_tester(const C &orig, const Iter &first, const Iter &last)
void prepare_insert_n(C &, size_t)
void MakeRandomValue(bool &b)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value