summaryrefslogtreecommitdiff
path: root/src/pugixml.cpp
diff options
context:
space:
mode:
authorMatthäus Brandl <brandl.matthaeus@gmail.com>2018-03-02 05:13:43 +0100
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2018-03-01 20:13:43 -0800
commit8284dbf61d85d82d17060dc34528d07a92829b40 (patch)
treecc74eee65cc19a8a3a35b0735b0142eb557edf20 /src/pugixml.cpp
parent41219a5a207a25ff16f661fae280523084c12dc3 (diff)
Add noexcept specifiers to move special members where possible (#183)
* Adds a macro definition to be able to use noexcept with supporting compilers * Adds noexcept specifier to move special members of xpath_node_set, xpath_variable_set and xpath_query, but not of xml_document as it has a throwing implementation
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r--src/pugixml.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index a6930a1..6f6aac8 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -12044,7 +12044,7 @@ namespace pugi
}
#ifdef PUGIXML_HAS_MOVE
- PUGI__FN void xpath_node_set::_move(xpath_node_set& rhs)
+ PUGI__FN void xpath_node_set::_move(xpath_node_set& rhs) PUGIXML_NOEXCEPT
{
_type = rhs._type;
_storage = rhs._storage;
@@ -12087,12 +12087,12 @@ namespace pugi
}
#ifdef PUGIXML_HAS_MOVE
- PUGI__FN xpath_node_set::xpath_node_set(xpath_node_set&& rhs): _type(type_unsorted), _begin(&_storage), _end(&_storage)
+ PUGI__FN xpath_node_set::xpath_node_set(xpath_node_set&& rhs) PUGIXML_NOEXCEPT: _type(type_unsorted), _begin(&_storage), _end(&_storage)
{
_move(rhs);
}
- PUGI__FN xpath_node_set& xpath_node_set::operator=(xpath_node_set&& rhs)
+ PUGI__FN xpath_node_set& xpath_node_set::operator=(xpath_node_set&& rhs) PUGIXML_NOEXCEPT
{
if (this == &rhs) return *this;
@@ -12287,7 +12287,7 @@ namespace pugi
}
#ifdef PUGIXML_HAS_MOVE
- PUGI__FN xpath_variable_set::xpath_variable_set(xpath_variable_set&& rhs)
+ PUGI__FN xpath_variable_set::xpath_variable_set(xpath_variable_set&& rhs) PUGIXML_NOEXCEPT
{
for (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i)
{
@@ -12296,7 +12296,7 @@ namespace pugi
}
}
- PUGI__FN xpath_variable_set& xpath_variable_set::operator=(xpath_variable_set&& rhs)
+ PUGI__FN xpath_variable_set& xpath_variable_set::operator=(xpath_variable_set&& rhs) PUGIXML_NOEXCEPT
{
for (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i)
{
@@ -12490,7 +12490,7 @@ namespace pugi
}
#ifdef PUGIXML_HAS_MOVE
- PUGI__FN xpath_query::xpath_query(xpath_query&& rhs)
+ PUGI__FN xpath_query::xpath_query(xpath_query&& rhs) PUGIXML_NOEXCEPT
{
_impl = rhs._impl;
_result = rhs._result;
@@ -12498,7 +12498,7 @@ namespace pugi
rhs._result = xpath_parse_result();
}
- PUGI__FN xpath_query& xpath_query::operator=(xpath_query&& rhs)
+ PUGI__FN xpath_query& xpath_query::operator=(xpath_query&& rhs) PUGIXML_NOEXCEPT
{
if (this == &rhs) return *this;