I am reading some code snippets from others and I find a line:
using namespace::std;
I suspect its purpose is using namespace std;, with some typos. But to my surprise the compiler accepts this code without any complaint. I build with:
$ g++ --version
g++ (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
$ /usr/bin/g++ ${SRC} -std=c++11 -pthread -Wall -Wno-deprecated -o ${OUT}
I wonder why is this code valid, and what effects will it make? I suspect it is a bad practice.