title: Can I implemented all C++ member function in header file but not intended for inline?
body: <p>For C programs, I know I need .h, and .cpp to allow multiple .h to be read and compiled together but linked later.</p>
  
  <p>However, for C++, I don't want to break up the class member function declaration and definition to two parts.  Although it is the typical C++ way, I am trying to merge member function declaration and definition in one header file.  I saw some people doing that.  I would like to know if there is any problem to do this.  </p>
  
  <ol>
  <li>I know all members defined in .h class definition are then inline functions, but can they be non-inline in any way?  Will compiler be controllable so that they don't have to be inline, for example, when the function is huge?</li>
  <li>The VS2015 intellisense shows error when the 2s is in a member function defined in header file, but doesn't show that in cpp file.  But it compiles.  Is it showing that I am doing it wrong, or it's a bug for VS2015?  I deleted the sdf, restarted the project, as long as copy the function into the .h file, it shows a read line under <code>std::this_thread::sleep_for(2s);</code></li>
  </ol>
  
  <p>see</p>
  
  <pre><code>class testtest {
      void tryagain() {
          using namespace std::chrono_literals;
          auto twosec = 2s;
          std::this_thread::sleep_for(2s);// problem is here
      }
  };
  </code></pre>
  
  <ol start="3">
  <li>Is compiling faster if we separate the .h and .cpp?</li>
  <li>My final compiler would be g++4.9.2, and I am using VS2015 to test build.  The final code will run on an ARM with 1GB RAM on Linux.</li>
  </ol>
  
  <p>I don't intend to argue about wich style is better, but hope to focus on whether it works, and what are the trade offs.</p>