summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-06-08 15:27:45 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2017-06-08 15:27:45 +0100
commit853ed6bc10c6948ffd1d3c6730d78818375458e1 (patch)
tree7a463069bf00a2a81d2e1d8e1fcb7cc9006a350c /libstdc++-v3/include
parent0b6bc904227e2dae47f178e4d5468931669df197 (diff)
downloadgcc-853ed6bc10c6948ffd1d3c6730d78818375458e1.tar.gz
PR libstdc++/81017 add noexcept to std::function move operations
PR libstdc++/81017 * include/bits/std_function.h (function::function(function&&)) (function::operator=(funtion&&)): Add noexcept. * testsuite/20_util/function/assign/move.cc: Check for noexcept. * testsuite/20_util/function/cons/move.cc: Likewise. From-SVN: r249018
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/bits/std_function.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/std_function.h b/libstdc++-v3/include/bits/std_function.h
index c4ea3473360..a9ba7567b33 100644
--- a/libstdc++-v3/include/bits/std_function.h
+++ b/libstdc++-v3/include/bits/std_function.h
@@ -438,7 +438,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* The newly-created %function contains the target of @a __x
* (if it has one).
*/
- function(function&& __x) : _Function_base()
+ function(function&& __x) noexcept : _Function_base()
{
__x.swap(*this);
}
@@ -495,7 +495,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* object, then this operation will not throw an %exception.
*/
function&
- operator=(function&& __x)
+ operator=(function&& __x) noexcept
{
function(std::move(__x)).swap(*this);
return *this;