summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/core/swap.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip
swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0. Updated our update.sh script to stop on error. Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to missing include of <iostream> with newer Boost. Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/core/swap.hpp')
-rw-r--r--3rdParty/Boost/src/boost/core/swap.hpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/core/swap.hpp b/3rdParty/Boost/src/boost/core/swap.hpp
new file mode 100644
index 0000000..baa1be9
--- /dev/null
+++ b/3rdParty/Boost/src/boost/core/swap.hpp
@@ -0,0 +1,60 @@
+// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker
+//
+// 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)
+// For more information, see http://www.boost.org
+
+
+#ifndef BOOST_CORE_SWAP_HPP
+#define BOOST_CORE_SWAP_HPP
+
+// Note: the implementation of this utility contains various workarounds:
+// - swap_impl is put outside the boost namespace, to avoid infinite
+// recursion (causing stack overflow) when swapping objects of a primitive
+// type.
+// - swap_impl has a using-directive, rather than a using-declaration,
+// because some compilers (including MSVC 7.1, Borland 5.9.3, and
+// Intel 8.1) don't do argument-dependent lookup when it has a
+// using-declaration instead.
+// - boost::swap has two template arguments, instead of one, to
+// avoid ambiguity when swapping objects of a Boost type that does
+// not have its own boost::swap overload.
+
+#include <utility> //for std::swap (C++11)
+#include <algorithm> //for std::swap (C++98)
+#include <cstddef> //for std::size_t
+#include <boost/config.hpp>
+
+namespace boost_swap_impl
+{
+ template<class T>
+ BOOST_GPU_ENABLED
+ void swap_impl(T& left, T& right)
+ {
+ using namespace std;//use std::swap if argument dependent lookup fails
+ swap(left,right);
+ }
+
+ template<class T, std::size_t N>
+ BOOST_GPU_ENABLED
+ void swap_impl(T (& left)[N], T (& right)[N])
+ {
+ for (std::size_t i = 0; i < N; ++i)
+ {
+ ::boost_swap_impl::swap_impl(left[i], right[i]);
+ }
+ }
+}
+
+namespace boost
+{
+ template<class T1, class T2>
+ BOOST_GPU_ENABLED
+ void swap(T1& left, T2& right)
+ {
+ ::boost_swap_impl::swap_impl(left, right);
+ }
+}
+
+#endif