[cxx-abi-dev] Transfer modes for parameters and return values
John McCall
rjmccall at apple.com
Wed May 7 18:49:10 UTC 2014
On May 7, 2014, at 11:35 AM, Richard Smith <richardsmith at google.com> wrote:
> On 7 May 2014 11:23, "John McCall" <rjmccall at apple.com> wrote:
> > I’d be okay with the rule “if the type has a non-trivial copy constructor, move constructor, or destructor, or if all its copy and move constructors are declared as deleted”.
>
> I could live with that (but the currently-proposed language change doesn't allow it; we'd need to remove the accessibility check there). Drop the "declared as", though - I don't think it should matter how the functions came to be deleted.
I keep forgetting that it’s illegal to retroactively delete a function. Yes, I agree that it shouldn’t matter how the function came to be deleted.
> I think I'd also prefer to phrase this in a way that's not dependent on whether a deleted function is trivial.
>
> "[Pass an object of class type by value if] every copy constructor and move constructor is deleted or trivial and at least one of them is not deleted, and the destructor is trivial.”
That works.
John.
More information about the cxx-abi-dev
mailing list