// header
namespace _impl {
struct internal {};
}
_impl::internal thing();
// source
#include "header"
using namespace _impl;
internal thing() { ... };
The only real risk you run into is if you're doing the blob build stuff or you end up including new headers you didn't expect, but if it's small self-contained code... who cares. If you run into a problem, fix it then. There are more important things to worry about.A lot of people forget that you can use a namespace alias, which is handy if your only concern is the length of the namespace.
namespace x = some::really::verbose::name;
// now equivalent
some::really::verbose::name foo();
x::type foo() {};