Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni...
by mianos on Tuesday August 08, 2023 @11:58PM
(#37058542)
If you have ever worked in C++, you will find there are numerous Code Lawyers whose main business is to review all C++ for minor C++2030 infractions, missing optimisations and lack of use of the most obtuse language feature when you do things like:
[ Parent
| on HN ]
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni...
by MathMonkeyMan on Wednesday August 09, 2023 @04:23AM
(#37059989)
I think you meant
int ii{};
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni...
by xy2_ on Wednesday August 09, 2023 @05:08AM
(#37060283)
I think you meant
auto ii{};
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni...
by MathMonkeyMan on Wednesday August 09, 2023 @06:14AM
(#37060644)
Not at all. I meant
std::common_type_t<bool, char> ii{};
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni...
by mianos on Wednesday August 09, 2023 @08:23AM
(#37061576)
Not sure this one is actually valid. You can't infer a type. Maybe in C++40 where types are so 30s?
Re:Are Implicit Operators a Path to Clean Code or a Buggy Ni...
by MathMonkeyMan on Wednesday August 09, 2023 @10:17AM
(#37063011)
C++030 is just next year!