Should a standard include header be specified in each file or as a compiler parameter?
- by Max
I've got a file such as this:
#ifndef STDINCLUDE
#define STDINCLUDE
#include <memory>
#include <stdexcept>
#endif
I want this file to be included in every header file, because I use stuff from those headers so much. Is it preferable to include this via compiler options (-I stdinclude.hpp), or should I physically include them in each header? (#include <stdinclude>). Note that I am attempting to be cross-platform-minded. I use cmake to serve atleast Unix and Windows.