#include
<algorithm>
bool includes (In first1, In last1, In2 first2, In2 last2) bool includes (In first1, In last1, In2 first2, In2 last2, Binary comp) bool includes (Exec pol, In first1, In last1, In2 first2, In2 last2) bool includes (Exec pol, In first1, In last1, In2 first2, In2 last2, Binary comp) bool ranges::includes (Range1 r1, Range2 r2, Binary comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) bool ranges::includes (In first1, In last1, In2 first2, In2 last2, Binary comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {})
Ist wahr, wenn jedes Element des aufsteigend sortierten Bereiches [first2,last2) im aufsteigend sortierten Bereich [first,last) enthalten ist
first | Anfang eines Bereiches |
last | Ende eines Bereiches |
first2 | Anfang des Teilbereiches |
last2 | Ende des Teilbereiches |
comp | Vergleichskriterium (Vorgabe = less ) |
proj | einstelliger Funktor (Vorgabe = std::identity ) |
pol | parallele Ausführungsart |
Rückgabewert: true
, wenn die Teilmengenbeziehung besteht.
#include <algorithm> #include <string> #include <iostream> int main() { std::string p = "abcdefghijklmnopqrstuvwxyz"; std::string q = "aeiou"; if (std::includes(begin(p), end(p), begin(q), end(q)) { std::cout << p << " enthält alle Vokale.\n"; } }