Skip to content

Passing a custom comparator object #6

@kartiklakhotia

Description

@kartiklakhotia

Hi,

I am trying to do a decreasing sort on an array (say keys), using the values in another array (say val). For this, I have written a custom comparator class and am passing an object to the boost function. While the same technique compiles with the std::sort, it gives an error with the boost::sort::parallel_stable_sort and boost::sort::block_indirect_sort.

Comparator class:

image

Function calls to boost/std sorts:

image

Error:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions