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
There was removed void parallel_sort(const Range& rng, const Compare& comp) {
and void parallel_sort(const Range& rng) {
Probably it was done by mistake, with intention to instead remove the redundant void parallel_sort(Range& rng, const Compare& comp) {
and void parallel_sort(Range& rng) {
The text was updated successfully, but these errors were encountered:
sf-mc
changed the title
parallel_sort requires lvalue range, thus cannot be used rlavue ranges (which is a common use in our codebase)
parallel_sort requires lvalue range, thus cannot be used rlavue ranges (which is a common use case in our codebase)
Jul 20, 2021
Some clarification. void parallel_sort(Range& rng) {
is required for ranges like std::vector, because their begin() const returns const iterator.
And void parallel_sort(const Range& rng) {
is needed for rvalue ranges like std::span, with usage like
Hello @ivankochin,
Yes, it will help.
It is also worth to add such use case (rvalue ranges like std::span) to your unit test, so as to prevent people from deleting such overload by mistake.
This bug was introduced in commit 4cebdd9.
There was removed
void parallel_sort(const Range& rng, const Compare& comp) {
and
void parallel_sort(const Range& rng) {
Probably it was done by mistake, with intention to instead remove the redundant
void parallel_sort(Range& rng, const Compare& comp) {
and
void parallel_sort(Range& rng) {
The bug is still present in the latest version, see
https://github.com/oneapi-src/oneTBB/blob/master/include/oneapi/tbb/parallel_sort.h#L253
The text was updated successfully, but these errors were encountered: