]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/utility/swap.hpp
Update boost to version 1.58
[lyx.git] / boost / boost / utility / swap.hpp
index 85de422c23bc83190c96bc819e96080547f26d18..dd9ecd907010418f16b0acfdaab1529bc12f1ee3 100644 (file)
@@ -1,55 +1,17 @@
-// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker\r
-//\r
-// Distributed under the Boost Software License, Version 1.0. (See\r
-// accompanying file LICENSE_1_0.txt or copy at\r
-// http://www.boost.org/LICENSE_1_0.txt)\r
-// For more information, see http://www.boost.org\r
-\r
-\r
-#ifndef BOOST_UTILITY_SWAP_HPP\r
-#define BOOST_UTILITY_SWAP_HPP\r
-\r
-// Note: the implementation of this utility contains various workarounds:\r
-// - swap_impl is put outside the boost namespace, to avoid infinite\r
-// recursion (causing stack overflow) when swapping objects of a primitive\r
-// type.\r
-// - swap_impl has a using-directive, rather than a using-declaration,\r
-// because some compilers (including MSVC 7.1, Borland 5.9.3, and\r
-// Intel 8.1) don't do argument-dependent lookup when it has a\r
-// using-declaration instead.\r
-// - boost::swap has two template arguments, instead of one, to\r
-// avoid ambiguity when swapping objects of a Boost type that does\r
-// not have its own boost::swap overload.\r
-\r
-#include <algorithm> //for std::swap\r
-#include <cstddef> //for std::size_t\r
-\r
-namespace boost_swap_impl\r
-{\r
-  template<class T>\r
-  void swap_impl(T& left, T& right)\r
-  {\r
-    using namespace std;//use std::swap if argument dependent lookup fails\r
-    swap(left,right);\r
-  }\r
-\r
-  template<class T, std::size_t N>\r
-  void swap_impl(T (& left)[N], T (& right)[N])\r
-  {\r
-    for (std::size_t i = 0; i < N; ++i)\r
-    {\r
-      ::boost_swap_impl::swap_impl(left[i], right[i]);\r
-    }\r
-  }\r
-}\r
-\r
-namespace boost\r
-{\r
-  template<class T1, class T2>\r
-  void swap(T1& left, T2& right)\r
-  {\r
-    ::boost_swap_impl::swap_impl(left, right);\r
-  }\r
-}\r
-\r
-#endif\r
+/*
+ * Copyright (c) 2014 Glen Fernandes
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See
+ * accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#ifndef BOOST_UTILITY_SWAP_HPP
+#define BOOST_UTILITY_SWAP_HPP
+
+// The header file at this path is deprecated;
+// use boost/core/swap.hpp instead.
+
+#include <boost/core/swap.hpp>
+
+#endif