title: Creating a namespace using a class defined in another namespace
body: <p>I was trying out the following code whether it works or not. Need help whether it could be done in any other way.</p>
  
  <pre><code> // FOO.hpp
   namespace traits {
     class FOO {
         public:
          typedef std::vector&lt;int&gt;     vec_t;
          typedef std::map &lt;int, int&gt;  map_t;
     };
    };
  
   namespace my_traits = traits::FOO;
   //I know the compile will give the error as "FOO" is not a namespace-name. 
  
   // in BAR.hpp
   using namespace my_traits;
   class BAR {
     private:
       vec_t  my_vector;   //  my_traits will have FOO's members (typedefs)
       map_t  my_map;      //  my_traits will have FOO's members (typedefs)
    };
  
  
  
  
    I **don't** want to do the following :
    using namespace traits;
    class BAR {
      private:
        traits::FOO::vec_t  my_vector  //  AVOID
        traits::FOO::map_t  my_map     //  AVOID
    }
  </code></pre>
  
  <p>But essentially I want to put all the typedefs  in class FOO and then use FOO as a namespace. I dont want to put typdefs in any namespace as such.</p>
  
  <p>Is that possible in C++11 (or in general C++).</p>
  
  <p>Thanks </p>