MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / equal

Function equal

3rd/wildcards/include/cx/algorithm.hpp:15–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14template <typename Iterator1, typename Iterator2>
15constexpr bool equal(Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2)
16{
17#if cfg_HAS_CONSTEXPR14
18
19 while (first1 != last1 && first2 != last2 && *first1 == *first2)
20 {
21 ++first1, ++first2;
22 }
23
24 return first1 == last1 && first2 == last2;
25
26#else // !cfg_HAS_CONSTEXPR14
27
28 return first1 != last1 && first2 != last2 && *first1 == *first2
29 ? equal(first1 + 1, last1, first2 + 1, last2)
30 : first1 == last1 && first2 == last2;
31
32#endif // cfg_HAS_CONSTEXPR14
33}
34
35} // namespace cx
36

Callers 5

operator==Function · 0.70
operator==Function · 0.70
equalMethod · 0.70
operator==Function · 0.70
TESTFunction · 0.50

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.40