You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
template <typename R, typename T , typename U>
concept sort_concept = std::equality_comparable<T, U>
and std::copy_constructible<T>
and std::incrementable<T>
and std::indirectly_readable<T>
and std::swappable<T>
and std::strict_weak_order<R, T, U>;
(Side note: The space in T , appears also in the book.)
Afterwards, following function is defined:
voidsort(sort_concept auto begin, sort_concept auto end);
Regarding sort_concept:
std::equality_comparable only has one template parameter. Did you intent to use std::equality_comparable_with<T, U> or maybe sentinel_for<T, U>?
Shouldn't you use std::indirect_strict_weak_order<R, T, U> instead of std::strict_weak_order<R, T, U>?
Why is it templated of both T and U? Wasn't there only one InIt on page 240 that we write this concept for?
The use of sort_concept auto in the definition of void sort(...) wont compile. The concept takes three arguments, but we only (implicitly) provide one argument.
Label: 4.6: T.10
The text was updated successfully, but these errors were encountered:
On page 241 is following concept defined:
(Side note: The space in
T ,
appears also in the book.)Afterwards, following function is defined:
sort_concept
:std::equality_comparable_with<T, U>
or maybesentinel_for<T, U>
?std::indirect_strict_weak_order<R, T, U>
instead ofstd::strict_weak_order<R, T, U>
?T
andU
? Wasn't there only oneInIt
on page 240 that we write this concept for?sort_concept auto
in the definition ofvoid sort(...)
wont compile. The concept takes three arguments, but we only (implicitly) provide one argument.Label: 4.6: T.10
The text was updated successfully, but these errors were encountered: