Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Reference
Libraries Reference
<algorithm>
Functions
 checked_merge

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Standard C++ Library Reference 
checked_merge 

Same as merge, but enforces the use of a checked iterator as output iterator. checked_merge is defined in the stdext namespace.

NoteNote

This algorithm is a Microsoft extension to the Standard C++ Library. Code implemented using this algorithm will not be portable.

template<class InputIterator1, class InputIterator2, class OutputIterator>
   OutputIterator checked_merge(
      InputIterator1 _First1,
      InputIterator1 _Last1,
      InputIterator2 _First2,
      InputIterator2 _Last2,
      OutputIterator _Result
   );
template<class InputIterator1, class InputIterator2, class OutputIterator, class BinaryPredicate>
   OutputIterator checked_merge(
      InputIterator1 _First1,
      InputIterator1 _Last1,
      InputIterator2 _First2,
      InputIterator2 _Last2,
      OutputIterator _Result
      BinaryPredicate _Comp
   );

Parameters

_First1

An input iterator addressing the position of the first element in the first of two sorted source ranges to be combined and sorted into a single range.

_Last1

An input iterator addressing the position one past the last element in the first of two sorted source ranges to be combined and sorted into a single range.

_First2

An input iterator addressing the position of the first element in second of two consecutive sorted source ranges to be combined and sorted into a single range.

_Last2

An input iterator addressing the position one past the last element in second of two consecutive sorted source ranges to be combined and sorted into a single range.

_Result

An output iterator addressing the position of the first element in the destination range where the two source ranges are to be combined into a single sorted range.

_Comp

User-defined predicate function object that defines the sense in which one element is greater than another. The binary predicate takes two arguments and should return true when the first element is less than the second element and false otherwise.

An output iterator addressing the position one past the last element in the sorted destination range.

See merge for a code sample.

For more information on checked iterators, see Checked Iterators.

Header: <algorithm>

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker