Surprisingly the below code compiles and runs without error on a variety of compilers and versions.
#include <iostream>
int main() {
endl(std::cout);
return 0;
}
How does it compile? I am sure there is no endl in global scope because a code like
std::cout << endl;
would fail unless using is used or else you need std::endl.
Aucun commentaire:
Enregistrer un commentaire