Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
左辺値から右辺値への標準変換に関して、基本的なものが欠けていると思います。
C++11 4.1 から:
非関数、非配列型 T の glvalue は prvalue に変換できます
したがって、変数を宣言しますx。
x
int x = 42;
このスコープ内の式xは左辺値 (つまり、glvalue) になりました。これは、左辺値から右辺値への変換に関する 4.1 の要件を満たしています。
左辺値から右辺値への変換が式に適用されるコンテキストの典型的な例は何xですか?