Skip to content

Non-actual information regardng RValue life extension #6

Description

@ujos

In the For People New to C++ there is following text:

you can capture returned temporary objects from a function by constant reference to reduce the number of copy constructors

That makes sense for C++03 and maybe C++11. In case of C++14 (or better) it is possible to return value even if copy and more constructors are explicitly deleted. I mean in this case it makes no sense to extend the life of the RValue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions