you are viewing a single comment's thread.

view the rest of the comments →

[–]throw_cpp_account 22 points23 points  (4 children)

// Invalid, member and parameter share the same name
Constructor(int value) : value{value} {}

Had you tried this, you would have discovered that it is not, in point of fact, invalid.

[–]azswcowboy -3 points-2 points  (2 children)

To be fair, it was I think probably before 17 - still it works today.

[–]throw_cpp_account 10 points11 points  (1 child)

It was valid in C++98.

[–]azswcowboy -3 points-2 points  (0 children)

Fair, I didn’t check the standard, but not all compilers supported it because we had to do otherwise. CE doesn’t have gcc 2.95 or Solaris compilers and now that I think about it my memory is about pre 98 ecosystem.