When I compile <map> as part of clang, with -pedantic enabled, I get the
following warnings:
In file included from /usr/include/c++/v1/map:442: /usr/include/c++/v1/__tree:874:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] #if _LIBCPP_STD_VER <= 11 ^ /usr/include/c++/v1/__tree:877:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] #endif ^ /usr/include/c++/v1/__tree:1392:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] #if _LIBCPP_STD_VER <= 11 ^ /usr/include/c++/v1/__tree:1395:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] #endif ^
This is because the #ifs are within the parameter list of a
_NOEXCEPT_() macro invocation. EricWF fixed something similar in
rL242623, by moving the #if outside the macro invocation.