transform-reduce compiling with seq but not par - bug?
Kai
kai_pf@gmx.de
Sat Dec 19 21:40:52 GMT 2020
On 19/12/2020 11:32, Jonathan Wakely wrote:
> On Fri, 18 Dec 2020, 23:42 Kai via Gcc-help, <gcc-help@gcc.gnu.org
> <mailto:gcc-help@gcc.gnu.org>> wrote:
> But my initial intention was to avoid copying of objects (they might
> become large) as much as possible, thus passing by reference or
moving.
>
> Returning by value is not expensive in C++17. The values will be moved
> whenever possible, or the copy will be elided completely.
>
> As I wrote, the statement compiles (and works) when policy is
> execution::seq - which strikes me as odd...
>
> Failing to meet the function's requirements doesn't mean it definitely
> won't compile.
Thanks again, also for your additional explanation and the (unexpected
:) ) bug report.
Cheers, Kai
--
"25 years from now will you come to my cremation?" <The Beautiful
South>
D-55120 Meenz
++ PGP Key fingerprint 059D 4FAA FE93 5928 1B22 7FAF EC08 5BF9 D50E
F933 ++
-----BEGIN GEEK CODE BLOCK-----
VERSION: 3.12
GCS/IT d- s: a++>-----(?) C++$ UL++(++++$) P++ L++$ E-(+) W--(+) N !w---
!O !M V? PS+ PE-() Y+ PGP++ t R@* tv--(-) b+>++ DI++ G e+++(*) h? y?
------END GEEK CODE BLOCK------
More information about the Gcc-help
mailing list