title: multiple definition in stl class header
body: <p>I am getting stuck using this class, when I used in the main.cpp there is no problem and execute perfectly, but when I use it as a member class the compiler doesn't like it and sends the message "Multiple definition of:"
  Here is the class:</p>
  
  <p>RTPSocket.h:</p>
  
  <pre><code>#ifndef RTP_SOCKET_HDR
  #define RTP_SOCKET_HDR
      namespace RTPConnection
      {
  
      enum EMode
      {
          Sender,
          Receiver
      };
  
      template&lt;EMode Mode&gt;
      class RTPSocket
      {
      };
      }//end namespace
  
  
  #define RTP_SOCKET_IMP
  #include "RTPSocket_Imp.h"//file where i declare the implementation code
  #undef RTP_SOCKET_IMP
  #endif
  </code></pre>
  
  <p>this class by itself doesn't have any problem but when i use it in my class, but ....
  used in another class
  my file.h</p>
  
  <pre><code>#include RTPSocket.h 
  class CommClass
  {
  private:
  RTPSocket&lt;RTPConnection::Receiver&gt;  * mRTPServer;
  }
  </code></pre>
  
  <p>the compiler give this error message:
  multiple definition of 'enum RTPConnection::EMode'</p>
  
  <p>this is a method that is declared in another file "rtpsocket_imp.h"
  with the guard declared:</p>
  
  <pre><code>template&lt;EMode Mode&gt;
  void RTPSocket&lt;Mode&gt;::write(char* aArray, 
                                        const size_t aiSize)
  {
      std::string message("The write function is operative only on Sender Mode");
      throw BadTemplate(message);
  }
  </code></pre>