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
2728#include < stddef.h>
2829
3738# include < iosfwd>
3839# include < string>
3940#endif
41+ #endif
4042
4143// Check if std::string_view is both requested and available
4244#if defined(PUGIXML_STRING_VIEW) && !defined(PUGIXML_NO_STL)
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