The following code should generate compilation error according to me. Because I think the compiler might be confused to know which foo() to call.
#include <iostream>
typedef long long ll;
void foo(unsigned ll) {
std::cout << "1";
}
void foo(unsigned long long) {
std::cout << "2";
}
int main() {
foo(2ull);
}
Aucun commentaire:
Enregistrer un commentaire