Is there any difference between wrapping both header and cpp file contents in a namespace or wrapping just the header contents and then doing using namespace
The Foo::TheFunc() is not in the correct namespacein the VS-case. Use 'void X::Foo::TheFunc() {}' to implement the function in the correct namespace (X).