On Wednesday, 17 April 2019 at 23:44:42 UTC, Adam D. Ruppe wrote:
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
};
Yes, thanks. :)
Actually, I asked initially because in C++ you can do the thing I
described.
I thought that you meant something I missed with out-out.
- Stefanos