On Wednesday, 17 April 2019 at 23:26:16 UTC, Stefanos Baziotis wrote:
I argue C++'s mistake was *out-out* implicit construction

What do you mean by out-out?

In C++, if you define a struct/class, and constructors apply for this.

struct Test {
   Test(const char* foo) {}
};

void cool(Test t) {}

cool("string"); // works


That works in C++, unless you mark that constructor with `explicit`


struct Test {
explicit Test(const char* foo) {} // this opts out of the cool thing above
};

Reply via email to