ARTICLE AD BOX
Suppose I have a unity build:
//impl1.h //impl1.cpp -> #include s impl1.h //impl2.h //impl2.cpp -> #include s impl2.h AND impl1.h //main.cpp #include "impl1.cpp" #include "impl2.cpp" int main(){ //stuff }Does it matter that impl1.h is like so:
#ifndef IMPL1_H #define IMPL1_H //impl1.h stuff #endifas opposed to
#pragma once //impl1.h stuffThe reason I ask is that the semantics of the header guard seem to me to make it absolutely certain that
#include "impl2.cpp"
does not again process impl1.h. With #pragma once, and assuming #include " " engages in more or less plain straightforward textual substitution, are there issues with the compiler seeing multiple #pragma onces corresponding to the same or different header files when it processes main.cpp ?
3
