title: How to access enum present as a template class member in another namespace?
body: <p>I'm working on c++, following is my template class:</p>
  
  <pre><code>namespace My{    
  template&lt;class config&gt;
  class BasicValue
  {
  public:
      enum Type
      {
          NULL_TYPE = 0,
          OBJECT_TYPE,
          ARRAY_TYPE,
          STRING_TYPE,
          BOOL_TYPE,
          INT_TYPE,
          REAL_TYPE,
      }; // Type
  };// BasicValue
  
  }// My
  </code></pre>
  
  <p>Now, Im accessing this "Type" enum from another .cpp file. Im getting following compilation error for all enum types:</p>
  
  <pre><code>error: ‘STRING_TYPE’ was not declared in this scope
  </code></pre>
  
  <p>How I can use this enum outside the "My" namespace?</p>
  
  <p>Following is the code usage, Im using the enum value in switch case:</p>
  
  <pre><code>void printValue(const Value&amp; val, int space)
  {    
      int sp = space;
      switch(val.type())
      {
          case STRING_TYPE:
              break;
          case BOOL_TYPE:
              break;
          case INT_TYPE:
              break;
          case REAL_TYPE:
              break;
          default:
              exit(-1);
      }
  }
  </code></pre>