What does std::includes actually do?

I posted this in the cpplang slack, and Casey Carter responded:

The description of the algorithm in the standard is defective. The intent is to determine [if] every element in the needle appears in order in the haystack.

[The algorithm it actually performs is:] “Returns true if the intersection of sorted sequences R1 and R2 is equal to R2”

Or, if we ensure we are certain of the meaning of subsequence:

Returns: true if and only if [first2, last2) is a subsequence of [first1, last1)

link to Casey Carter’s message

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)