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/uuid/uuid.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/uuid/uuid.hpp')
-rw-r--r--3rdParty/Boost/src/boost/uuid/uuid.hpp83
1 files changed, 37 insertions, 46 deletions
diff --git a/3rdParty/Boost/src/boost/uuid/uuid.hpp b/3rdParty/Boost/src/boost/uuid/uuid.hpp
index 2678d85..d8593c0 100644
--- a/3rdParty/Boost/src/boost/uuid/uuid.hpp
+++ b/3rdParty/Boost/src/boost/uuid/uuid.hpp
@@ -28,20 +28,23 @@
// 28 Nov 2009 - disabled deprecated warnings for MSVC
// 30 Nov 2009 - used BOOST_STATIC_CONSTANT
// 02 Dec 2009 - removed BOOST_STATIC_CONSTANT - not all compilers like it
+// 29 Apr 2013 - added support for noexcept and constexpr, added optimizations for SSE/AVX
#ifndef BOOST_UUID_HPP
#define BOOST_UUID_HPP
-#include <boost/config.hpp>
-#include <stddef.h>
+#include <cstddef>
#include <boost/cstdint.hpp>
-#include <algorithm>
-#include <boost/config.hpp> // for static assert
+#include <boost/uuid/detail/config.hpp>
#ifndef BOOST_UUID_NO_TYPE_TRAITS
#include <boost/type_traits/is_pod.hpp>
#include <boost/type_traits/integral_constant.hpp>
#endif
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
#if defined(_MSC_VER)
#pragma warning(push) // Save warning settings.
#pragma warning(disable : 4996) // Disable deprecated std::swap_ranges, std::equal
@@ -69,28 +72,20 @@ public:
typedef std::ptrdiff_t difference_type;
// This does not work on some compilers
- // They seem to want the variable definec in
+ // They seem to want the variable definec in
// a cpp file
//BOOST_STATIC_CONSTANT(size_type, static_size = 16);
- static size_type static_size() { return 16; }
+ static BOOST_CONSTEXPR size_type static_size() BOOST_NOEXCEPT { return 16; }
public:
- iterator begin() { return data; } /* throw() */
- const_iterator begin() const { return data; } /* throw() */
- iterator end() { return data+size(); } /* throw() */
- const_iterator end() const { return data+size(); } /* throw() */
+ iterator begin() BOOST_NOEXCEPT { return data; }
+ const_iterator begin() const BOOST_NOEXCEPT { return data; }
+ iterator end() BOOST_NOEXCEPT { return data+size(); }
+ const_iterator end() const BOOST_NOEXCEPT { return data+size(); }
- size_type size() const { return static_size(); } /* throw() */
+ BOOST_CONSTEXPR size_type size() const BOOST_NOEXCEPT { return static_size(); }
- bool is_nil() const /* throw() */
- {
- for(size_t i=0; i<static_size(); i++) {
- if (data[i] != 0U) {
- return false;
- }
- }
- return true;
- }
+ bool is_nil() const BOOST_NOEXCEPT;
enum variant_type
{
@@ -99,7 +94,7 @@ public:
variant_microsoft, // Microsoft Corporation backward compatibility
variant_future // future definition
};
- variant_type variant() const /* throw() */
+ variant_type variant() const BOOST_NOEXCEPT
{
// variant is stored in octet 7
// which is index 8, since indexes count backwards
@@ -115,8 +110,8 @@ public:
return variant_future;
}
}
-
- enum version_type
+
+ enum version_type
{
version_unknown = -1,
version_time_based = 1,
@@ -125,11 +120,11 @@ public:
version_random_number_based = 4,
version_name_based_sha1 = 5
};
- version_type version() const /* throw() */
+ version_type version() const BOOST_NOEXCEPT
{
- //version is stored in octet 9
+ // version is stored in octet 9
// which is index 6, since indexes count backwards
- unsigned char octet9 = data[6];
+ uint8_t octet9 = data[6];
if ( (octet9 & 0xF0) == 0x10 ) {
return version_time_based;
} else if ( (octet9 & 0xF0) == 0x20 ) {
@@ -146,55 +141,45 @@ public:
}
// note: linear complexity
- void swap(uuid& rhs) /* throw() */
- {
- std::swap_ranges(begin(), end(), rhs.begin());
- }
+ void swap(uuid& rhs) BOOST_NOEXCEPT;
public:
// or should it be array<uint8_t, 16>
uint8_t data[16];
};
-inline bool operator==(uuid const& lhs, uuid const& rhs) /* throw() */
-{
- return std::equal(lhs.begin(), lhs.end(), rhs.begin());
-}
+bool operator== (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT;
+bool operator< (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT;
-inline bool operator!=(uuid const& lhs, uuid const& rhs) /* throw() */
+inline bool operator!=(uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT
{
return !(lhs == rhs);
}
-inline bool operator<(uuid const& lhs, uuid const& rhs) /* throw() */
-{
- return std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
-}
-
-inline bool operator>(uuid const& lhs, uuid const& rhs) /* throw() */
+inline bool operator>(uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT
{
return rhs < lhs;
}
-inline bool operator<=(uuid const& lhs, uuid const& rhs) /* throw() */
+inline bool operator<=(uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT
{
return !(rhs < lhs);
}
-inline bool operator>=(uuid const& lhs, uuid const& rhs) /* throw() */
+inline bool operator>=(uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT
{
return !(lhs < rhs);
}
-inline void swap(uuid& lhs, uuid& rhs) /* throw() */
+inline void swap(uuid& lhs, uuid& rhs) BOOST_NOEXCEPT
{
lhs.swap(rhs);
}
// This is equivalent to boost::hash_range(u.begin(), u.end());
-inline std::size_t hash_value(uuid const& u) /* throw() */
+inline std::size_t hash_value(uuid const& u) BOOST_NOEXCEPT
{
std::size_t seed = 0;
- for(uuid::const_iterator i=u.begin(); i != u.end(); ++i)
+ for(uuid::const_iterator i=u.begin(), e=u.end(); i != e; ++i)
{
seed ^= static_cast<std::size_t>(*i) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
@@ -214,6 +199,12 @@ struct is_pod<uuids::uuid> : true_type {};
} // namespace boost
#endif
+#if defined(BOOST_UUID_USE_SSE2)
+#include <boost/uuid/detail/uuid_x86.hpp>
+#else
+#include <boost/uuid/detail/uuid_generic.hpp>
+#endif
+
#if defined(_MSC_VER)
#pragma warning(pop) // Restore warnings to previous state.
#endif