Can we access the unnamed namespaces outside the file they were created?

  accessibility, c++, namespaces, scope

i was reading about namespace online and where i read the stuff about unnamed namespaces , there i
read that unnamed namespace are only accessible within the file they were created .but when i tried
it on my own it worked fine. how is that possible;
here is what i did.


using namespace std;
namespace space1 {
    int a = 10;
    void f() {
        cout << "in space1 of code 1" << endl;
namespace {
    int x = 20;
    void f() {
        cout << "in unnamed space" << endl;

file2: where i accessed the namespace from file1

#include "code1.cpp"
using namespace std;
int main() {
    cout << space1::a;
    cout << x << endl;

    return 0;

Source: Windows Questions C++