1
Vote

inplace_merge requires iterator::value_type to be default constructible

description

Repro:
struct Test
{
    Test(int v) : v(v) {}
    bool operator<(const Test& r) const { return v < r.v; }
    int v;
};
std::vector<Test> v(100, 1);
inplace_merge(std::experimental::parallel::par, v.begin(), v.begin(), v.end());
We're creating an array of iterator::value_type in _Inplace_merge_impl causing the above code to be ill-formed, cf. inplace_merge(v.begin(), v.begin(), v.end());.

comments

gbb21 wrote Jun 4, 2014 at 11:02 PM

Thanks for reporting.

We have confirmed and resolved this issue. It will be fixed in next release.

Hong