I'm trying to find out whether it's safe to use #import
(instead of #include
with include guards) in a cross-platform C++11 library?
The articles I found on SO and elsewhere seem to indicate that #import was proposed to be included in the C++11 standard, yet judging by answers from around ~2012 it still seemed to be Microsoft and GCC specific extensions with import not being an accepted standard.
No, there's no "
#import
" in the current C++ standard.The syntax has often been proposed as part of a module system for C++, but so far there hasn't been sufficient consensus on how such a system should work in detail.