C++相談室 part60 at TECH
[2ch|▼Menu]
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