Custom iterator works with std::sort but not with tbb::parallel_sort?

前端 未结 4 674
日久生厌
日久生厌 2021-02-15 18:13

I am trying to use tbb::parallel_sort to sort 2 arrays at the same time. Intel\'s documentation here says https://software.intel.com/en-us/node/506167 The req

4条回答
  •  南旧
    南旧 (楼主)
    2021-02-15 18:58

    I was not able to compile basic use case (i.e. with std::sort). Thus, the code is adapted to compile successfully in one specific compiler case.

    BTW, RandomAccessIterator satisfies ForwardIterator requirements too. And if we look at the ForwardIterator's requirements we find out that it should be DefaultConstructible. (see §24.2.5 Forward iterators, section (1.2) in one of the latest C++ standard's working draft)

提交回复
热议问题