Can somebody tell me a workaround for #pragma once directive support for various compilers?
I want to use in my header something like:
#if _MSC_VER > ... || __GNUC__ > ... || ...
#pragma once
#endif
Maybe it already exists in boost sources or in your code?
Use include guards:
Sometimes you’ll see these combined with the use of
#pragma once:#pragma onceis pretty widely supported.