From e80373f226ca6ef92371fe473f253ac3adbc7ab3 Mon Sep 17 00:00:00 2001 From: Xeverous <20820409+Xeverous@users.noreply.github.com> Date: Fri, 17 Feb 2023 17:31:31 +0100 Subject: [PATCH] fix typo in code example in C.43 (#2040) --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index fd4c4cb..a2d4767 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -5603,7 +5603,7 @@ A default constructor often simplifies the task of defining a suitable [moved-fr }; vector vd1(1000); // default Date needed here - vector vd2(1000, Date{Month::October, 7, 1885}); // alternative + vector vd2(1000, Date{7, Month::October, 1885}); // alternative The default constructor is only auto-generated if there is no user-declared constructor, hence it's impossible to initialize the vector `vd1` in the example above. The absence of a default value can cause surprises for users and complicate its use, so if one can be reasonably defined, it should be.