2323#ifndef HEADER_PUGIXML_HPP
2424#define HEADER_PUGIXML_HPP
2525
26+ #ifndef PUGIXML_EXPORT_MODULE
2627// Include stddef.h for size_t and ptrdiff_t
27- #include < stddef.h>
28+ # include < stddef.h>
2829
2930// Include exception header for XPath
30- #if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)
31- # include < exception>
32- #endif
31+ # if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)
32+ # include < exception>
33+ # endif
3334
3435// Include STL headers
35- #ifndef PUGIXML_NO_STL
36- # include < iterator>
37- # include < iosfwd>
38- # include < string>
36+ # ifndef PUGIXML_NO_STL
37+ # include < iterator>
38+ # include < iosfwd>
39+ # include < string>
40+ # endif
3941#endif
4042
4143// Check if std::string_view is both requested and available
4850#endif
4951
5052// Include string_view if appropriate
51- #ifdef PUGIXML_HAS_STRING_VIEW
52- # include < string_view>
53+ #ifndef PUGIXML_MODULE_EXPORT
54+ # ifdef PUGIXML_HAS_STRING_VIEW
55+ # include < string_view>
56+ # endif
5357#endif
5458
5559// Macro for deprecated features
150154// If C++ is 2017 or higher, add 'inline' qualifiers for constants
151155// required for C++20 module
152156#ifndef PUGIXML_CONSTANT
153- # if __cplusplus >= 201703
154- # define PUGIXML_CONSTANT inline PUGIXML_CONSTEXPR
155- # else
156- # define PUGIXML_CONSTANT PUGIXML_CONSTEXPR
157- # endif
157+ # if __cplusplus >= 201703
158+ # define PUGIXML_CONSTANT inline PUGIXML_CONSTEXPR
159+ # else
160+ # define PUGIXML_CONSTANT PUGIXML_CONSTEXPR
161+ # endif
158162#endif
159163
160164// Character interface macros
166170# define PUGIXML_CHAR char
167171#endif
168172
173+ #ifndef PUGIXML_MODULE_EXPORT
174+ # define PUGIXML_MODULE_EXPORT
175+ #endif
176+
169177namespace pugi
170178{
171179 // Character type used for all internal storage and operations; depends on PUGIXML_WCHAR_MODE
@@ -183,7 +191,7 @@ namespace pugi
183191}
184192
185193// The PugiXML namespace
186- namespace pugi
194+ PUGIXML_MODULE_EXPORT namespace pugi
187195{
188196 // Tree node types
189197 enum xml_node_type
0 commit comments