From db6448f7ea7eaa502e64b46de534dd8542d09f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 19 Jan 2015 00:05:05 +0100 Subject: [PATCH] Added is_nothrow_swappable --- include/boost/move/detail/type_traits.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/boost/move/detail/type_traits.hpp b/include/boost/move/detail/type_traits.hpp index ffae853..cf91acb 100644 --- a/include/boost/move/detail/type_traits.hpp +++ b/include/boost/move/detail/type_traits.hpp @@ -810,6 +810,15 @@ template struct is_nothrow_move_assignable { static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T); }; +////////////////////////////////////// +// is_nothrow_swappable +////////////////////////////////////// +template +struct is_nothrow_swappable +{ + static const bool value = is_empty::value || is_pod::value; +}; + ////////////////////////////////////// // alignment_of //////////////////////////////////////