Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/uuid/detail/uuid_generic.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | f46d142149f5 |
children |
rev | line source |
---|---|
Chris@102 | 1 /* |
Chris@102 | 2 * Copyright Andy Tompkins 2006. |
Chris@102 | 3 * Distributed under the Boost Software License, Version 1.0. |
Chris@102 | 4 * (See accompanying file LICENSE_1_0.txt or copy at |
Chris@102 | 5 * http://www.boost.org/LICENSE_1_0.txt) |
Chris@102 | 6 */ |
Chris@102 | 7 /*! |
Chris@102 | 8 * \file uuid/detail/uuid_generic.hpp |
Chris@102 | 9 * |
Chris@102 | 10 * \brief This header contains generic implementation of \c boost::uuid operations. |
Chris@102 | 11 */ |
Chris@102 | 12 |
Chris@102 | 13 #ifndef BOOST_UUID_DETAIL_UUID_GENERIC_HPP_INCLUDED_ |
Chris@102 | 14 #define BOOST_UUID_DETAIL_UUID_GENERIC_HPP_INCLUDED_ |
Chris@102 | 15 |
Chris@102 | 16 #include <string.h> |
Chris@102 | 17 |
Chris@102 | 18 namespace boost { |
Chris@102 | 19 namespace uuids { |
Chris@102 | 20 |
Chris@102 | 21 inline bool uuid::is_nil() const BOOST_NOEXCEPT |
Chris@102 | 22 { |
Chris@102 | 23 for (std::size_t i = 0; i < sizeof(data); ++i) |
Chris@102 | 24 { |
Chris@102 | 25 if (data[i] != 0U) |
Chris@102 | 26 return false; |
Chris@102 | 27 } |
Chris@102 | 28 return true; |
Chris@102 | 29 } |
Chris@102 | 30 |
Chris@102 | 31 inline void uuid::swap(uuid& rhs) BOOST_NOEXCEPT |
Chris@102 | 32 { |
Chris@102 | 33 uuid tmp = *this; |
Chris@102 | 34 *this = rhs; |
Chris@102 | 35 rhs = tmp; |
Chris@102 | 36 } |
Chris@102 | 37 |
Chris@102 | 38 inline bool operator== (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT |
Chris@102 | 39 { |
Chris@102 | 40 return memcmp(lhs.data, rhs.data, sizeof(lhs.data)) == 0; |
Chris@102 | 41 } |
Chris@102 | 42 |
Chris@102 | 43 inline bool operator< (uuid const& lhs, uuid const& rhs) BOOST_NOEXCEPT |
Chris@102 | 44 { |
Chris@102 | 45 return memcmp(lhs.data, rhs.data, sizeof(lhs.data)) < 0; |
Chris@102 | 46 } |
Chris@102 | 47 |
Chris@102 | 48 } // namespace uuids |
Chris@102 | 49 } // namespace boost |
Chris@102 | 50 |
Chris@102 | 51 #endif // BOOST_UUID_DETAIL_UUID_GENERIC_HPP_INCLUDED_ |