title: class field with a type defined in an anonymous namespace
body: <p>I have a struct defined in an anonymous namespace.  Then I also want to have a class defined which has a field of that struct type.
  I forward declare the struct in the header file:</p>
  <pre><code>struct my_str;
  
  class my_class {
  public:
    struct my_str *field;
    void method();
  };
  </code></pre>
  <p>and then in the cpp file I have the actual type defined and some methods using it:</p>
  <pre><code>namespace {
  struct my_str {
    int data;
  };
  }
  
  void helper(struct my_str * obj) {
    std::cout &lt;&lt; obj-&gt;data;
  }
  
  void my_class::method() {
    helper(field);
  }
  </code></pre>
  <p>This doesn't compile:</p>
  <p>test.cc:10:20: error: reference to ‘my_str’ is ambiguous</p>
  <p>It lists 2 definitions for my_str, the forward declaration and the one from the anonymous namespace.<br />
  Is there a way to disambiguate and make this compile?</p>