extern(C++, "namespace") void foo() {} compile with -HC When a namespace is specified, the symbol is left out of the header file completely.
this produces namespace namespace { extern void foo(); }