[SG10] A feature macro for mandatory copy elision
Jonathan Wakely
cxx at kayari.org
Mon Oct 9 18:12:17 CEST 2017
On 9 October 2017 at 17:10, Nelson, Clark <clark.nelson at intel.com> wrote:
> Perhaps I should also ask: should the name of the macro use the word
> "mandatory", or would "guaranteed" (as from the original document title) be
> better?
>
>
Yes, I was going to suggest "guaranteed".
> Clark
>
> > -----Original Message-----
> > From: features-bounces at open-std.org [mailto:features-bounces at open-
> > std.org] On Behalf Of Nelson, Clark
> > Sent: Monday, October 09, 2017 09:09
> > To: Richard Smith <richard at metafoo.co.uk>; Ville Voutilainen
> > <ville.voutilainen at gmail.com>
> > Cc: features at isocpp.open-std.org <Features at open-std.org>
> > Subject: Re: [SG10] A feature macro for mandatory copy elision
> >
> > > After a while pondering, the best example I've got to demonstrate a
> > > need for the feature test macro is something like this:
> > >
> > > #ifdef __cpp_mandatory_copy_elision
> > >
> > > NoCopyNoMove indirectFactory() {
> > > return factory(1); // ill-formed prior to C++17
> > > }
> > > #endif
> >
> > At this point I gather that no one has an objection to providing a
> > macro for mandatory copy elision.
> >
> > Should SD-6 contain an example like this one? It seems to me that
> > there ought to be a different definition of indirectFactory under an
> > #else, but I don't know what it should look like.
> >
> > Clark
> > _______________________________________________
> > Features mailing list
> > Features at isocpp.open-std.org
> > http://www.open-std.org/mailman/listinfo/features
> _______________________________________________
> Features mailing list
> Features at isocpp.open-std.org
> http://www.open-std.org/mailman/listinfo/features
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open-std.org/pipermail/features/attachments/20171009/270299b9/attachment.html
More information about the Features
mailing list