4 ms·
Having a vector with a sized based constructor transform an integer into a vector is surprising.
by Guvante 3y ago
Having a vector with a sized based constructor transform an integer into a vector is surprising.
- gumby 3y agoYeah, I find that weird too — everybody does. It’s a legacy of the early 90s. But the case under discussion is single-argument constructors, which can also be considered conversion operators.
- Guvante 3y agoNo, the topic was "implicit isn't the right default" It was a mistake that can't be fixed saying "C++ doesn't need implicit as a keyword so it is better" is wrong when explicit is the better default if you need one.