C++相談室 part60at TECH
C++相談室 part60 - 暇つぶし2ch141:デフォルトの名無しさん
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