title: How precompiled headers actually works
body: <p>All my quetions are related to vc++ compiler but I guess other c++ compilers have the same behavior.</p>
  
  <ol>
  <li>Are the precompiled headers a preprocessor-related stuff or this is all about the compilation process? Or both? I have several guess:
  
  <ul>
  <li>PCH-engine only expands MACRO-definitions and nested headers and translates them into binary format (pch file). In this case all source-files (I mean cpp/hpp which may be included in PCH too) will being recompiled in EVERY source files in project. Or not?</li>
  <li>All source-files will be compiled only once and pulled into single obj-file? For example, how many times will be compiled variant library in this example? I.e. only once - in PCH or two times - not in PCH but in both *.cpp files or three times - in PCH and both *.cpp files? and why?</li>
  </ul></li>
  </ol>
  
  <hr>
  
  <pre><code>//stdafx.h
  #include &lt;boost/variant/variant.hpp&gt;
  
  //test1.cpp
  #include "stdafx.h"
  #include &lt;boost/variant/variant.hpp&gt;
  ...
  
  //test2.cpp
  #include "stdafx.h"
  ...
  </code></pre>
  
  <ol start="2">
  <li>What files should I put in precompiled headers? I guess this is something that used everywhere in project and changed very rarely. What about libraries, boost for example? We use boost only in few source-files, should we put it in PCH?</li>
  </ol>