C++相談室 part60
at TECH
141:デフォルトの名無しさん
08/01/25 02:32:53
以下抜粋
1. lvalues can bind to an rvalue reference.
2.
struct A {};
void h(const A&);
void h(A&&);
void g(const A&);
void g(A&&);
void f(A&& a)
{
g(a); // calls g(const A&)
h(a); // calls h(const A&)
}
Although an rvalue can bind to the "a" parameter of f(), once bound, a is now treated as an lvalue.
>>139の言うとおりのような気がする。
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5129日前に更新/95 KB
担当:undef