test.cpp
#include "test.hpp"
void f1() { }
namespace {
void f2() {}
}
namespace test {
void f3() { }
}
Please correct me if I'm wrong, but:
f1
can be called from outside if it is declared in the header file or anextern
statement is usedf2
can't be called from outsidef3
can be called from outside if it is declared in the header file (and properly prefixed -test::
). If it is not declared in a header, it can't be called?
Am I right?