Defining a static class member inside of another namespace
<p>If I have a class with private static members in a namespace:</p>

<pre><code>namespace A {
class T {
    public: 
        //functions
    private:
        static bool a;
        static unsigned int b;
</code></pre>

<p>And I am doing unit testing of this class in another file such as:</p>

<pre><code>namespace {

bool A::T::a = false;
unsigned int A::T::b = 1;

/* tests declaring an instance of A...*/
</code></pre>

<p>I receive the error from Clang:</p>

<p><code>error: cannot define or redeclare 'a' here because namespace '' does not enclose namespace 'T'</code>
<code>error: cannot define or redeclare 'b' here because namespace '' does not enclose namespace 'T'</code></p>

<p>I have looked at other answers regarding static private members and the need to declare them where the declaration of the class is, which is what I believe I am doing here, but the error still escapes me.</p>