[過去ログ]
C++相談室 part164 (1002レス)
C++相談室 part164 http://mevius.5ch.net/test/read.cgi/tech/1683600652/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
937: デフォルトの名無しさん (ワッチョイ 1998-awtI) [sage] 2023/10/23(月) 05:17:34.59 ID:RG/DfB7W0 >933, >>935 https://www.google.com/search?q=initializer_list+move クソ回答する前にググれよ http://mevius.5ch.net/test/read.cgi/tech/1683600652/937
938: デフォルトの名無しさん (ワッチョイ 5d01-46Vy) [sage] 2023/10/23(月) 09:29:50.40 ID:9KLj8HWs0 >>936,937 あれ? $ cat test.cpp #include <iostream> using namespace std; struct A { A () {cout << "construct" << endl;} A (const A &p) = delete; A (A &&p) {cout << "move" << endl;} }; void func (initializer_list <A> p) { cout << "func" << endl; } int main () { A a0; A a1; func ({move (a0), move (a1)}); return 0; } $ g++ test.cpp $ ./a.out construct construct move move func http://mevius.5ch.net/test/read.cgi/tech/1683600652/938
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
1.805s*