diff options
author | Matthäus Brandl <brandl.matthaeus@gmail.com> | 2018-03-03 19:19:37 +0100 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2018-03-03 10:19:37 -0800 |
commit | 9187e6500c0a5fe5fedcc5444c234bfcb8a61a2a (patch) | |
tree | 9af926043021597a127703b644402c50497245dd /src/pugixml.hpp | |
parent | 8284dbf61d85d82d17060dc34528d07a92829b40 (diff) |
Adds noexcept specifiers to the move special members of xml_document,… (#185)
* Adds noexcept specifiers to the move special members of xml_document, but only #ifndef PUGIXML_COMPACT
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r-- | src/pugixml.hpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp index a0dd0e4..dc887a9 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -91,8 +91,14 @@ #endif #ifdef PUGIXML_HAS_NOEXCEPT # define PUGIXML_NOEXCEPT noexcept +# ifdef PUGIXML_COMPACT +# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT +# else +# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT noexcept +# endif #else # define PUGIXML_NOEXCEPT +# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT #endif // If C++ is 2011 or higher, add 'override' qualifiers @@ -999,7 +1005,7 @@ namespace pugi void _create(); void _destroy(); - void _move(xml_document& rhs); + void _move(xml_document& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT; public: // Default constructor, makes empty document @@ -1010,8 +1016,8 @@ namespace pugi #ifdef PUGIXML_HAS_MOVE // Move semantics support - xml_document(xml_document&& rhs); - xml_document& operator=(xml_document&& rhs); + xml_document(xml_document&& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT; + xml_document& operator=(xml_document&& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT; #endif // Removes all nodes, leaving the empty document |