Skip to content

Commit 6eab024

Browse files
committed
added constructor comment
1 parent e83a8d5 commit 6eab024

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

content/posts/cpp-for-cscharp.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,12 @@ Type test = { .foo = x, .bar = y }; // for structs and arrays
301301
Type test = {}; // default value (already in C++11)
302302

303303
// C++98/03 (inherited everything from C89)
304-
Type test(x);
305-
Type test = Type(x);
304+
Type test(x); // uses constructor
305+
Type test = Type(x); // uses constructor
306306

307307
// C++11
308-
Type test{x};
309-
Type test = Type{x};
308+
Type test{x}; // uses constructor
309+
Type test = Type{x}; // uses constructor
310310
Type test{}; // default value
311311
Type test = Type{}; // default value
312312
Type test = {}; // default value
@@ -323,7 +323,7 @@ Type test = { .foo = x, .bar = y}; // for structs and arrays (already in C99)
323323
Type test; // uninitialized
324324
Type test = default; // default value
325325
326-
Type test = new Type(x);
326+
Type test = new Type(x); // uses constructor
327327
Type test = new Type{ foo = x, bar = y }; // for structs
328328
329329
Type test = {x, y, z}; // works on arrays

0 commit comments

Comments
 (0)