The question concerns the contents of the .pch binary created by the Visual Studio compiler. What does it contain? Is it only the parsed tree of the header files, or object code as well?
Consider this example:
// myheader.h
#include <vector>
class A {
public:
void add(int i) { v.push_back(i); }
private:
std::vector<int> v;
};
Would including this header in the set to be precompiled result in a complete template instantiation of vector<int> being compiled and added to the .pch?
To give some more context; if only the parse tree is precompiled, this means that object code for instantiated templates will still be created once per compile unit with resulting increases in compile and link time. So "unity builds"/reducing compile units would still be a relevant factor in decreasing build time even with precompiled headers enabled.