> Without knowing the type of the vector, we don’t know what constructor it’s invoking, so we can’t really say what that line is doing.
> Without knowing the type of the vector, we don’t know what constructor it’s invoking, so we can’t really say what that line is doing.
I am saying 1-arg constructors that aren't semantically "conversions" from that arg need to be be explicit, not implicit. If you make them implicit, that's your mistake; tools can catch that mistake statically.
I don't get the point of your question. You might as well ask: "Let's say someone in a library somewhere has defined their type's operator< to wipe your disk. If you see std::less<>()(a, b), can you say what the call does without knowing the types?"
To which the answer is... well, obviously, no. Same answer to your question.
What is this supposed to imply?
Someone has made an implicit constructor that makes a network call because... people are dumb. This implicit constructor takes an integer.
Does the following code make a network call?
vec.push_back(4);> Without knowing the type of the vector, we don’t know what constructor it’s invoking, so we can’t really say what that line is doing.