Retourner au contenu associé (journal : Clay Style Sheet)
Posté par Goth le 31 juillet 2025 à 09:59. En réponse au journal Clay Style Sheet. Évalué à 2.
Juste pour préciser, depuis C++ > 11 seul l'ordre est obligatoire pour l'initialisation des designated initializers.
struct foo_type { int a = 1; int b; int c = 1; int* ptr = nullptr; ~foo_type() { delete ptr; } }; int main() { auto foo_1 = foo_type{ .b = 1, .ptr = new int(1) }; auto foo_2 = foo_type{ .a = 1, .b = 1, .c = 1, }; auto foo_3 = foo_type{ .a = 1, .c = 1, // .b = 1, Error }; }
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: Clay
Posté par Goth . En réponse au journal Clay Style Sheet. Évalué à 2.
Juste pour préciser, depuis C++ > 11 seul l'ordre est obligatoire pour l'initialisation des designated initializers.