C++ - Implementation Challenge: Replacing std::move and std::forward

44 comments · 87% upvoted · source · other discussions

comments

tradrich

move() and forward() are terse enough. Implement them as language features? Possibly. But it might encourage their over-use. I suspect that's why they're implemented as they are.

I don't see the macros as worth it.

Plorkyeran

The advantage of the macros is compile time and better debugger behavior, not terseness.

pork_spare_ribs

Better debugging behaviour in unoptimised builds sounds reasonable. 250ms fixed cost of compile time is pushing the boundaries of reasonable.

atilaneves

I get annoyed when compiling a file takes 250ms in total.