Skip to content

Commit

Permalink
rename PUGIXML_CONSTEXPR macro to PUGIXML_CONSTEXPR11
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthapz committed Oct 31, 2024
1 parent bcf8b86 commit 33df3e2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/pugixml.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,24 +141,26 @@
#endif

// If C++ is 2011 or higher, add 'constexpr' qualifiers
#ifndef PUGIXML_CONSTEXPR
#ifndef PUGIXML_CONSTEXPR11
# if __cplusplus >= 201103
# define PUGIXML_CONSTEXPR constexpr
# define PUGIXML_CONSTEXPR11 constexpr
# elif defined(_MSC_VER) && _MSC_VER >= 1910
# define PUGIXML_CONSTEXPR constexpr
# define PUGIXML_CONSTEXPR11 constexpr
# else
# define PUGIXML_CONSTEXPR const
# define PUGIXML_CONSTEXPR11
# endif
#endif

// If C++ is 2017 or higher, add 'inline' qualifiers for constants
// required for C++20 module
#ifndef PUGIXML_CONSTANT
# if __cplusplus >= 201703
# define PUGIXML_CONSTANT inline PUGIXML_CONSTEXPR
# define PUGIXML_CONSTANT inline PUGIXML_CONSTEXPR11
# elif __cplusplus >= 201103
# define PUGIXML_CONSTANT PUGIXML_CONSTEXPR11
# else
# define PUGIXML_CONSTANT PUGIXML_CONSTEXPR
# endif
# define PUGIXML_CONSTANT const
#endif
#endif

// Character interface macros
Expand Down

0 comments on commit 33df3e2

Please sign in to comment.