title: Is dllexport/dllimport ignore member template functions?
body: <p>I am using Visual Studio right now. I have a classic macro to mark dll api functions and classes.
  My understanding is that marking a class dllexport makes it's functions visible from other binaries, making possible to use the type provided by the dll.</p>
  
  <p>I would like to know what is the behaviour of dllexport and dllimport when the class contain template member functions? My initial suspicion is that it just ignore them, and that would be exactly what I want.</p>
  
  <p>But I can't find where in the MSDN they explain this specific case (they explain other cases though).</p>
  
  <p>Example:</p>
  
  <pre><code>    class MY_API Log // MY_API is either __declspec( dllexport ) or __declspec( dllimport ) depending on if we are compiling the library or using it's header
      {
      public:
  
              // is this ignored?
          template&lt; typename TypeOfSomething &gt;
          Log&amp; write( const TypeOfSomething&amp; something ) 
          {
              test_stream &lt;&lt; something;
          }
  
          ~Log(); // ok this is exported/imported
  
      private:
            std::stringstream text_stream;
      };
  </code></pre>
  
  <p>I simplified the code to give this example.</p>
  
  <p>What I suspect is that if the client code use the write() function, it will instantiate the template, generating a real function code, maybe inlined. In this case, will the compiler mark it "dllimport" as it should with all member functions, or will it do nothing and just use that version in the client code?</p>