cpp/algorithm/equal: Unterschied zwischen den Versionen
Aus cppreference.com
P12bot (Diskussion | Beiträge) K (r2.7.3) (Bot: Ergänze: en, it, pt, zh) |
P12bot (Diskussion | Beiträge) K (Use {{lc}}. Update links. Various fixes.) |
||
Zeile 2: | Zeile 2: | ||
{{cpp/title|equal}} | {{cpp/title|equal}} | ||
{{cpp/algorithm/navbar}} | {{cpp/algorithm/navbar}} | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{header | algorithm}} |
− | {{ | + | {{| num=1 | |
template< class InputIt1, class InputIt2 > | template< class InputIt1, class InputIt2 > | ||
bool equal( InputIt1 first1, InputIt1 last1, | bool equal( InputIt1 first1, InputIt1 last1, | ||
InputIt2 first2 ); | InputIt2 first2 ); | ||
}} | }} | ||
− | {{ | + | {{| num=2 | |
template< class InputIt1, class InputIt2, class BinaryPredicate > | template< class InputIt1, class InputIt2, class BinaryPredicate > | ||
bool equal( InputIt1 first1, InputIt1 last1, | bool equal( InputIt1 first1, InputIt1 last1, | ||
InputIt2 first2, BinaryPredicate p ); | InputIt2 first2, BinaryPredicate p ); | ||
}} | }} | ||
− | {{ | + | {{end}} |
{{tr|Versandkosten {{c|true}} wenn die Elemente gleich sind in zwei Bereiche: ein durch {{tt|[first1, last1)}} und anderen ab {{tt|first2}} definiert. Die erste Version der Funktion verwendet {{c|operator{{==}}}}, um die Elemente zu vergleichen, verwendet die zweite die gegebenen binären Prädikats {{tt|p}} .|Returns {{c|true}} if the elements are the same in two ranges: one defined by {{tt|[first1, last1)}} and another starting at {{tt|first2}}. The first version of the function uses {{c|operator{{==}}}} to compare the elements, the second uses the given binary predicate {{tt|p}}.}} | {{tr|Versandkosten {{c|true}} wenn die Elemente gleich sind in zwei Bereiche: ein durch {{tt|[first1, last1)}} und anderen ab {{tt|first2}} definiert. Die erste Version der Funktion verwendet {{c|operator{{==}}}}, um die Elemente zu vergleichen, verwendet die zweite die gegebenen binären Prädikats {{tt|p}} .|Returns {{c|true}} if the elements are the same in two ranges: one defined by {{tt|[first1, last1)}} and another starting at {{tt|first2}}. The first version of the function uses {{c|operator{{==}}}} to compare the elements, the second uses the given binary predicate {{tt|p}}.}} | ||
===Parameter=== | ===Parameter=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| first1, last1 |{{tr| der erste Bereich von den Elementen zu vergleichen| the first range of the elements to compare}}}} |
− | {{ | + | {{| first2 |{{tr| beginnend von dem zweiten Bereich von den Elementen zu vergleichen| beginning of the second range of the elements to compare}}}} |
− | {{ | + | {{pred2 eq | p | p1=InputIt1 | p2=InputIt2}} |
− | {{ | + | {{hreq}} |
− | {{ | + | {{req concept | InputIt1, InputIt2 | InputIterator}} |
− | {{ | + | {{end}} |
===Rückgabewert=== | ===Rückgabewert=== | ||
Zeile 31: | Zeile 31: | ||
===Notes=== | ===Notes=== | ||
− | {{tr|{{tt|std::equal}} nicht verwendet, um die Bereiche von den Iteratoren aus {{ | + | {{tr|{{tt|std::equal}} nicht verwendet, um die Bereiche von den Iteratoren aus {{|std::unordered_set}}, {{|std::unordered_multiset}}, {{|std::unordered_map}} oder {{|std::unordered_multimap}} gebildet vergleichen werden, da die Reihenfolge, in welcher die Elemente in diesen Behältern gelagert werden können unterschiedlich sein, selbst wenn die beiden Behälter die gleichen Elemente zu speichern . |{{tt|std::equal}} may not be used to compare the ranges formed by the iterators from {{|std::unordered_set}}, {{|std::unordered_multiset}}, {{|std::unordered_map}}, or {{|std::unordered_multimap}} because the order in which the elements are stored in those containers may be different even if the two containers store the same elements. }} |
{{tr|Beim Vergleich ganze Container für Gleichheit, operator == ist in der Regel bevorzugt .|When comparing entire containers for equality, operator== is usually preferred.}} | {{tr|Beim Vergleich ganze Container für Gleichheit, operator == ist in der Regel bevorzugt .|When comparing entire containers for equality, operator== is usually preferred.}} | ||
Zeile 93: | Zeile 93: | ||
}} | }} | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| cpp/algorithm/find}} |
− | {{ | + | {{| cpp/algorithm/lexicographical_compare}} |
− | {{ | + | {{| cpp/algorithm/mismatch}} |
− | {{ | + | {{| cpp/algorithm/search}} |
− | {{ | + | {{end}} |
[[en:cpp/algorithm/equal]] | [[en:cpp/algorithm/equal]] |
Version vom 1. Juli 2013, 18:39 Uhr
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |