An unnamed namespace behaves as if it were replaced by a namespace with a uniquely generated name, immediately followed by the using directive.
This means that the declaration of your function refers to the namespace in the same way as if the namespace actually had a name. Thus, its definition must be in the same namespace: either declare, or define the function, or add the namespace {} environment around the definition (which works because all occurrences of the unnamed namespace in the translation unit belong to the same namespace) .
namespace { void SkipWhitespace(const char s*) { for (; !isspace(s); ++s) {} } }
icecrime
source share