[SG10] A feature macro for mandatory copy elision
Ville Voutilainen
ville.voutilainen at gmail.com
Thu Oct 5 23:20:02 CEST 2017
On 5 October 2017 at 23:50, Richard Smith <richard at metafoo.co.uk> wrote:
> What benefit does the feature-test macro give you over using the
> non-guaranteed-copy-elision implementation in all cases?
I can let users store the thing returned by the factory function as
they would store any object,
rather than force them to use lifetime-extending references.
Furthermore, if I decide that I really
hate having to use those references, I will disable the whole type if
guaranteed copy elision is not available.
This example I have is, as usual, not the only use case for a feature macro.
More information about the Features
mailing list