== Why is this an issue?

Rvalue references were introduced as part of {cpp}11. They are thus a new feature of the language, and are not yet widely understood. Using them is complicated, and code using rvalue references may be difficult to understand. 


=== Noncompliant code example

[source,cpp]
----
std::vector<int> return_vector(void)
{
    std::vector<int> tmp {1,2,3,4,5};
    return tmp;
}

std::vector<int> &&rval_ref = return_vector(); // Noncompliant
----


=== Compliant solution

[source,cpp]
----
std::vector<int> return_vector(void)
{
    std::vector<int> tmp {1,2,3,4,5};
    return tmp;
}

const std::vector<int>& rval_ref = return_vector();
----


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Rework this logic to eliminate the rvalue reference.


'''
== Comments And Links
(visible only on this page)

=== on 8 Aug 2016, 21:51:55 Ann Campbell wrote:
\[~massimo.paladin] please add a Noncompliant comment to the Noncompliant Code Example

=== on 15 Aug 2016, 09:20:21 Massimo PALADIN wrote:
\[~ann.campbell.2] done.

endif::env-github,rspecator-view[]
