mattkretz / wg21-papers

my papers to WG21 — the C++ committee
5 stars 7 forks source link

Relax the requirements on the return types of generator functions passed to datapar constructors #51

Closed mattkretz closed 7 years ago

mattkretz commented 7 years ago

from VcDevel/Vc#162:

The requirements on a generator function for the datapar constructor seem overly strict. It currently requires the function to return objects of the value type. It should just be values implicitly convertible to the value type, I think.

my opinion:

I agree that this can be annoying. I'd be open for allowing the same conversions that the broadcast ctor allows.

@jensmaurer: Any opinion?

jensmaurer commented 7 years ago

Yes, the broadcast constructor and the generator ctor's generator return type should have the same conversions applied; presumably "safe" ones. No need for LEWG guidance here, I believe.

mattkretz commented 7 years ago

Okay, I agree. Sorry for the misleading LEWG tag. That's just meant as fallback if we don't resolve the issue before the next meeting.