I can do
std::vector<int> v;
begin(v);
yet, when I do
std::vector<int> v;
::begin(v);
I get
error: ‘::begin’ has not been declared ::begin(v);
It works again if I put
using namespace std;
at the top of the file, which I find weird, because I thought doing ::begin
would actively prevent it from using std::begin
. What is happening here?