I wrote a small function accepting an vector
of int values.
void transform(vector<int> i) {
// actual code
}
int i = 5;
transform(5);
Now if I pass a single int value to the function it accepts it without any compiler warnings. Am I missing something fundamental here or does C++ some kind of magic auto packaging for me?
I used clang to compile the code and enabled all warnings with -Wall
.
Aucun commentaire:
Enregistrer un commentaire