Good practices to increase compilation speed:(加快编译速度好的做法)
- forward declaration whenever possible (尽量前置声明)
- precompiled headers (预编译头文件)
#pragma once
(not standard, but both MSVC and GCC support it) (非标准, MSVC和GCC支持)- pimpl pattern (Private Implement pattern 私有实现模式)