title: c++ typedef another class's enum?
body: <p>So here's my problem:</p>
  
  <pre><code>struct A
  {
      enum A_enum
      {
          E0,
          E1,
          E2
      };
  };
  
  struct B
  {
      typedef A::A_enum B_enum;
      bool test(B_enum val)
      {
          return (val == E1); // error: "E1" undeclared identifier
      }
  };
  </code></pre>
  
  <p>I specifically do not want to say <code>A::E1</code>. If I try <code>B_enum::E1</code> I receive a warning that it is nonstandard. Is there a good way to do something like this?</p>