diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 02:08:07 (GMT) |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 02:09:00 (GMT) |
commit | b5c87084afaef42b2d058f68091be31988a6a874 (patch) | |
tree | adef9a65870a41181687e11d57fdf98e7629de3c /boost | |
parent | 34bd32e225e2a8a94104489b31c42e5801cc1f4a (diff) | |
download | boost-b5c87084afaef42b2d058f68091be31988a6a874.zip boost-b5c87084afaef42b2d058f68091be31988a6a874.tar.gz boost-b5c87084afaef42b2d058f68091be31988a6a874.tar.bz2 |
Imported Upstream version 1.64.0upstream/1.64.0refs/changes/05/149705/1
Change-Id: Id9212edd016dd55f21172c427aa7894d1d24148b
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost')
1602 files changed, 51319 insertions, 20416 deletions
diff --git a/boost/align.hpp b/boost/align.hpp index 89eebe1..45fe36b 100644 --- a/boost/align.hpp +++ b/boost/align.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_HPP #define BOOST_ALIGN_HPP diff --git a/boost/align/align.hpp b/boost/align/align.hpp index 3582dcc..ee43710 100644 --- a/boost/align/align.hpp +++ b/boost/align/align.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGN_HPP #define BOOST_ALIGN_ALIGN_HPP diff --git a/boost/align/align_down.hpp b/boost/align/align_down.hpp index f437f8e..355844f 100644 --- a/boost/align/align_down.hpp +++ b/boost/align/align_down.hpp @@ -1,27 +1,25 @@ /* -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGN_DOWN_HPP #define BOOST_ALIGN_ALIGN_DOWN_HPP #include <boost/align/detail/align_down.hpp> -#include <boost/align/align_down_forward.hpp> namespace boost { namespace alignment { -BOOST_CONSTEXPR inline std::size_t align_down(std::size_t value, - std::size_t alignment) BOOST_NOEXCEPT +BOOST_CONSTEXPR inline std::size_t +align_down(std::size_t value, std::size_t alignment) BOOST_NOEXCEPT { return value & ~(alignment - 1); } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/align_down_forward.hpp b/boost/align/align_down_forward.hpp deleted file mode 100644 index 6d124e8..0000000 --- a/boost/align/align_down_forward.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/* -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> - -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt -*/ -#ifndef BOOST_ALIGN_ALIGN_DOWN_FORWARD_HPP -#define BOOST_ALIGN_ALIGN_DOWN_FORWARD_HPP - -#include <boost/config.hpp> -#include <cstddef> - -namespace boost { -namespace alignment { - -BOOST_CONSTEXPR std::size_t align_down(std::size_t value, - std::size_t alignment) BOOST_NOEXCEPT; - -} /* .alignment */ -} /* .boost */ - -#endif diff --git a/boost/align/align_up.hpp b/boost/align/align_up.hpp index b1cec19..6401ea8 100644 --- a/boost/align/align_up.hpp +++ b/boost/align/align_up.hpp @@ -1,27 +1,25 @@ /* -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGN_UP_HPP #define BOOST_ALIGN_ALIGN_UP_HPP #include <boost/align/detail/align_up.hpp> -#include <boost/align/align_up_forward.hpp> namespace boost { namespace alignment { -BOOST_CONSTEXPR inline std::size_t align_up(std::size_t value, - std::size_t alignment) BOOST_NOEXCEPT +BOOST_CONSTEXPR inline std::size_t +align_up(std::size_t value, std::size_t alignment) BOOST_NOEXCEPT { return (value + alignment - 1) & ~(alignment - 1); } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/align_up_forward.hpp b/boost/align/align_up_forward.hpp deleted file mode 100644 index 47fdfcd..0000000 --- a/boost/align/align_up_forward.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/* -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> - -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt -*/ -#ifndef BOOST_ALIGN_ALIGN_UP_FORWARD_HPP -#define BOOST_ALIGN_ALIGN_UP_FORWARD_HPP - -#include <boost/config.hpp> -#include <cstddef> - -namespace boost { -namespace alignment { - -BOOST_CONSTEXPR std::size_t align_up(std::size_t value, - std::size_t alignment) BOOST_NOEXCEPT; - -} /* .alignment */ -} /* .boost */ - -#endif diff --git a/boost/align/aligned_alloc.hpp b/boost/align/aligned_alloc.hpp index 7f2c0bb..42128f1 100644 --- a/boost/align/aligned_alloc.hpp +++ b/boost/align/aligned_alloc.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGNED_ALLOC_HPP #define BOOST_ALIGN_ALIGNED_ALLOC_HPP diff --git a/boost/align/aligned_allocator.hpp b/boost/align/aligned_allocator.hpp index b70ed54..6d0f788 100644 --- a/boost/align/aligned_allocator.hpp +++ b/boost/align/aligned_allocator.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_HPP #define BOOST_ALIGN_ALIGNED_ALLOCATOR_HPP @@ -74,12 +73,12 @@ public: } pointer allocate(size_type size, const_void_pointer = 0) { - void* p = 0; - if (size > 0) { - p = aligned_alloc(min_align, sizeof(T) * size); - if (!p) { - boost::throw_exception(std::bad_alloc()); - } + if (size == 0) { + return 0; + } + void* p = aligned_alloc(min_align, sizeof(T) * size); + if (!p) { + boost::throw_exception(std::bad_alloc()); } return static_cast<T*>(p); } @@ -139,21 +138,23 @@ public: }; }; -template<class T1, class T2, std::size_t Alignment> -inline bool operator==(const aligned_allocator<T1, Alignment>&, - const aligned_allocator<T2, Alignment>&) BOOST_NOEXCEPT +template<class T, class U, std::size_t Alignment> +inline bool +operator==(const aligned_allocator<T, Alignment>&, + const aligned_allocator<U, Alignment>&) BOOST_NOEXCEPT { return true; } -template<class T1, class T2, std::size_t Alignment> -inline bool operator!=(const aligned_allocator<T1, Alignment>&, - const aligned_allocator<T2, Alignment>&) BOOST_NOEXCEPT +template<class T, class U, std::size_t Alignment> +inline bool +operator!=(const aligned_allocator<T, Alignment>&, + const aligned_allocator<U, Alignment>&) BOOST_NOEXCEPT { return false; } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/aligned_allocator_adaptor.hpp b/boost/align/aligned_allocator_adaptor.hpp index b6ddd9c..8905c21 100644 --- a/boost/align/aligned_allocator_adaptor.hpp +++ b/boost/align/aligned_allocator_adaptor.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2016 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2016 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_HPP #define BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_HPP @@ -123,7 +122,8 @@ public: char_ptr p = a.allocate(sizeof p + n); void* r = detail::addressof(*p) + sizeof p; (void)align(min_align, s, r, n); - ::new((void*)(static_cast<char_ptr*>(r) - 1)) char_ptr(p); + ::new(static_cast<void*>(static_cast<char_ptr*>(r) + - 1)) char_ptr(p); return static_cast<pointer>(r); } @@ -142,12 +142,13 @@ public: #endif void* r = detail::addressof(*p) + sizeof p; (void)align(min_align, s, r, n); - ::new((void*)(static_cast<char_ptr*>(r) - 1)) char_ptr(p); + ::new(static_cast<void*>(static_cast<char_ptr*>(r) + - 1)) char_ptr(p); return static_cast<pointer>(r); } void deallocate(pointer ptr, size_type size) { - char_ptr* p = (char_ptr*)ptr - 1; + char_ptr* p = reinterpret_cast<char_ptr*>(ptr) - 1; char_ptr r = *p; p->~char_ptr(); char_alloc a(base()); @@ -156,23 +157,23 @@ public: } }; -template<class A1, class A2, std::size_t Alignment> -inline bool operator==(const aligned_allocator_adaptor<A1, - Alignment>& a, const aligned_allocator_adaptor<A2, - Alignment>& b) BOOST_NOEXCEPT +template<class A, class B, std::size_t Alignment> +inline bool +operator==(const aligned_allocator_adaptor<A, Alignment>& a, + const aligned_allocator_adaptor<B, Alignment>& b) BOOST_NOEXCEPT { return a.base() == b.base(); } -template<class A1, class A2, std::size_t Alignment> -inline bool operator!=(const aligned_allocator_adaptor<A1, - Alignment>& a, const aligned_allocator_adaptor<A2, - Alignment>& b) BOOST_NOEXCEPT +template<class A, class B, std::size_t Alignment> +inline bool +operator!=(const aligned_allocator_adaptor<A, Alignment>& a, + const aligned_allocator_adaptor<B, Alignment>& b) BOOST_NOEXCEPT { return !(a == b); } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/aligned_allocator_adaptor_forward.hpp b/boost/align/aligned_allocator_adaptor_forward.hpp index d606f09..f762cd1 100644 --- a/boost/align/aligned_allocator_adaptor_forward.hpp +++ b/boost/align/aligned_allocator_adaptor_forward.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_FORWARD_HPP #define BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_FORWARD_HPP @@ -17,7 +16,7 @@ namespace alignment { template<class Allocator, std::size_t Alignment = 1> class aligned_allocator_adaptor; -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/aligned_allocator_forward.hpp b/boost/align/aligned_allocator_forward.hpp index 41f917f..23add71 100644 --- a/boost/align/aligned_allocator_forward.hpp +++ b/boost/align/aligned_allocator_forward.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_FORWARD_HPP #define BOOST_ALIGN_ALIGNED_ALLOCATOR_FORWARD_HPP @@ -17,7 +16,7 @@ namespace alignment { template<class T, std::size_t Alignment = 1> class aligned_allocator; -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/aligned_delete.hpp b/boost/align/aligned_delete.hpp index 97b1c4b..385bd55 100644 --- a/boost/align/aligned_delete.hpp +++ b/boost/align/aligned_delete.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGNED_DELETE_HPP #define BOOST_ALIGN_ALIGNED_DELETE_HPP @@ -26,7 +25,7 @@ struct aligned_delete { } }; -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/aligned_delete_forward.hpp b/boost/align/aligned_delete_forward.hpp index 7334beb..d5b766d 100644 --- a/boost/align/aligned_delete_forward.hpp +++ b/boost/align/aligned_delete_forward.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGNED_DELETE_FORWARD_HPP #define BOOST_ALIGN_ALIGNED_DELETE_FORWARD_HPP @@ -14,7 +13,7 @@ namespace alignment { struct aligned_delete; -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/alignment_of.hpp b/boost/align/alignment_of.hpp index 3dd2eb5..488df0b 100644 --- a/boost/align/alignment_of.hpp +++ b/boost/align/alignment_of.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2016 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2016 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGNMENT_OF_HPP #define BOOST_ALIGN_ALIGNMENT_OF_HPP @@ -39,14 +38,15 @@ namespace alignment { template<class T> struct alignment_of - : detail::alignment_of<typename detail::element_type<T>::type> { }; + : detail::alignment_of<typename + detail::element_type<T>::type>::type { }; #if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) template<class T> constexpr std::size_t alignment_of_v = alignment_of<T>::value; #endif -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/alignment_of_forward.hpp b/boost/align/alignment_of_forward.hpp index 7ab2275..31db15f 100644 --- a/boost/align/alignment_of_forward.hpp +++ b/boost/align/alignment_of_forward.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP #define BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP @@ -15,7 +14,7 @@ namespace alignment { template<class T> struct alignment_of; -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/assume_aligned.hpp b/boost/align/assume_aligned.hpp index 8d9f6cc..22e5103 100644 --- a/boost/align/assume_aligned.hpp +++ b/boost/align/assume_aligned.hpp @@ -1,13 +1,12 @@ /* -(c) 2015 NumScale SAS -(c) 2015 LRI UMR 8623 CNRS/University Paris Sud XI +Copyright 2015 NumScale SAS +Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_ASSUME_ALIGNED_HPP #define BOOST_ALIGN_ASSUME_ALIGNED_HPP diff --git a/boost/align/detail/addressof.hpp b/boost/align/detail/addressof.hpp index 50731a7..a314830 100644 --- a/boost/align/detail/addressof.hpp +++ b/boost/align/detail/addressof.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ADDRESSOF_HPP #define BOOST_ALIGN_DETAIL_ADDRESSOF_HPP @@ -27,8 +26,8 @@ using std::addressof; using boost::addressof; #endif -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/align.hpp b/boost/align/detail/align.hpp index 77055e0..a58dcea 100644 --- a/boost/align/detail/align.hpp +++ b/boost/align/detail/align.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2016 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2016 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGN_HPP #define BOOST_ALIGN_DETAIL_ALIGN_HPP @@ -15,13 +14,14 @@ http://boost.org/LICENSE_1_0.txt namespace boost { namespace alignment { -inline void* align(std::size_t alignment, std::size_t size, - void*& ptr, std::size_t& space) +inline void* +align(std::size_t alignment, std::size_t size, void*& ptr, + std::size_t& space) { BOOST_ASSERT(detail::is_alignment(alignment)); if (size <= space) { - char* p = (char*)(((std::size_t)ptr + alignment - 1) & - ~(alignment - 1)); + char* p = reinterpret_cast<char*>((reinterpret_cast<std:: + size_t>(ptr) + alignment - 1) & ~(alignment - 1)); std::size_t n = space - (p - static_cast<char*>(ptr)); if (size <= n) { ptr = p; @@ -32,7 +32,7 @@ inline void* align(std::size_t alignment, std::size_t size, return 0; } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/align_cxx11.hpp b/boost/align/detail/align_cxx11.hpp index a95b84c..637541a 100644 --- a/boost/align/detail/align_cxx11.hpp +++ b/boost/align/detail/align_cxx11.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP #define BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP @@ -16,7 +15,7 @@ namespace alignment { using std::align; -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/align_down.hpp b/boost/align/detail/align_down.hpp index 97e1c1d..9a8c358 100644 --- a/boost/align/detail/align_down.hpp +++ b/boost/align/detail/align_down.hpp @@ -1,28 +1,28 @@ /* -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGN_DOWN_HPP #define BOOST_ALIGN_DETAIL_ALIGN_DOWN_HPP #include <boost/align/detail/is_alignment.hpp> -#include <boost/align/align_down_forward.hpp> #include <boost/assert.hpp> namespace boost { namespace alignment { -inline void* align_down(void* ptr, std::size_t alignment) BOOST_NOEXCEPT +inline void* +align_down(void* ptr, std::size_t alignment) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); - return (void*)(align_down((std::size_t)ptr, alignment)); + return reinterpret_cast<void*>(reinterpret_cast<std:: + size_t>(ptr) & ~(alignment - 1)); } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/align_up.hpp b/boost/align/detail/align_up.hpp index e956f7a..86686da 100644 --- a/boost/align/detail/align_up.hpp +++ b/boost/align/detail/align_up.hpp @@ -1,28 +1,28 @@ /* -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGN_UP_HPP #define BOOST_ALIGN_DETAIL_ALIGN_UP_HPP #include <boost/align/detail/is_alignment.hpp> -#include <boost/align/align_up_forward.hpp> #include <boost/assert.hpp> namespace boost { namespace alignment { -inline void* align_up(void* ptr, std::size_t alignment) BOOST_NOEXCEPT +inline void* +align_up(void* ptr, std::size_t alignment) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); - return (void*)(align_up((std::size_t)ptr, alignment)); + return reinterpret_cast<void*>((reinterpret_cast<std:: + size_t>(ptr) + alignment - 1) & ~(alignment - 1)); } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/aligned_alloc.hpp b/boost/align/detail/aligned_alloc.hpp index 0488847..69da196 100644 --- a/boost/align/detail/aligned_alloc.hpp +++ b/boost/align/detail/aligned_alloc.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP @@ -18,35 +17,36 @@ http://boost.org/LICENSE_1_0.txt namespace boost { namespace alignment { -inline void* aligned_alloc(std::size_t alignment, std::size_t size) - BOOST_NOEXCEPT +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); enum { - min_align = alignment_of<void*>::value + N = alignment_of<void*>::value }; - if (alignment < min_align) { - alignment = min_align; + if (alignment < N) { + alignment = N; } - std::size_t n = size + alignment - min_align; - void* r = 0; + std::size_t n = size + alignment - N; void* p = std::malloc(sizeof(void*) + n); if (p) { - r = static_cast<char*>(p) + sizeof p; + void* r = static_cast<char*>(p) + sizeof(void*); (void)align(alignment, size, r, n); *(static_cast<void**>(r) - 1) = p; + p = r; } - return r; + return p; } -inline void aligned_free(void* ptr) BOOST_NOEXCEPT +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT { if (ptr) { std::free(*(static_cast<void**>(ptr) - 1)); } } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/aligned_alloc_android.hpp b/boost/align/detail/aligned_alloc_android.hpp index 0ed28a4..4119fbd 100644 --- a/boost/align/detail/aligned_alloc_android.hpp +++ b/boost/align/detail/aligned_alloc_android.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP @@ -16,19 +15,20 @@ http://boost.org/LICENSE_1_0.txt namespace boost { namespace alignment { -inline void* aligned_alloc(std::size_t alignment, std::size_t size) - BOOST_NOEXCEPT +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); return ::memalign(alignment, size); } -inline void aligned_free(void* ptr) BOOST_NOEXCEPT +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT { ::free(ptr); } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/aligned_alloc_macos.hpp b/boost/align/detail/aligned_alloc_macos.hpp index 0bdb7c2..76366fa 100644 --- a/boost/align/detail/aligned_alloc_macos.hpp +++ b/boost/align/detail/aligned_alloc_macos.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP @@ -16,8 +15,8 @@ http://boost.org/LICENSE_1_0.txt namespace boost { namespace alignment { -inline void* aligned_alloc(std::size_t alignment, std::size_t size) - BOOST_NOEXCEPT +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); if (size == 0) { @@ -33,12 +32,13 @@ inline void* aligned_alloc(std::size_t alignment, std::size_t size) return p; } -inline void aligned_free(void* ptr) BOOST_NOEXCEPT +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT { ::free(ptr); } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/aligned_alloc_msvc.hpp b/boost/align/detail/aligned_alloc_msvc.hpp index abeccfc..45c57c9 100644 --- a/boost/align/detail/aligned_alloc_msvc.hpp +++ b/boost/align/detail/aligned_alloc_msvc.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MSVC_HPP #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MSVC_HPP @@ -16,19 +15,20 @@ http://boost.org/LICENSE_1_0.txt namespace boost { namespace alignment { -inline void* aligned_alloc(std::size_t alignment, std::size_t size) - BOOST_NOEXCEPT +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); return ::_aligned_malloc(size, alignment); } -inline void aligned_free(void* ptr) BOOST_NOEXCEPT +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT { ::_aligned_free(ptr); } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/aligned_alloc_posix.hpp b/boost/align/detail/aligned_alloc_posix.hpp index 931b0c4..78fc842 100644 --- a/boost/align/detail/aligned_alloc_posix.hpp +++ b/boost/align/detail/aligned_alloc_posix.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_POSIX_HPP #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_POSIX_HPP @@ -16,8 +15,8 @@ http://boost.org/LICENSE_1_0.txt namespace boost { namespace alignment { -inline void* aligned_alloc(std::size_t alignment, std::size_t size) - BOOST_NOEXCEPT +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); if (alignment < sizeof(void*)) { @@ -30,12 +29,13 @@ inline void* aligned_alloc(std::size_t alignment, std::size_t size) return p; } -inline void aligned_free(void* ptr) BOOST_NOEXCEPT +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT { ::free(ptr); } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/aligned_alloc_sunos.hpp b/boost/align/detail/aligned_alloc_sunos.hpp index 5039c73..0948b40 100644 --- a/boost/align/detail/aligned_alloc_sunos.hpp +++ b/boost/align/detail/aligned_alloc_sunos.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_SUNOS_HPP #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_SUNOS_HPP @@ -16,19 +15,20 @@ http://boost.org/LICENSE_1_0.txt namespace boost { namespace alignment { -inline void* aligned_alloc(std::size_t alignment, std::size_t size) - BOOST_NOEXCEPT +inline void* +aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); return ::memalign(alignment, size); } -inline void aligned_free(void* ptr) BOOST_NOEXCEPT +inline void +aligned_free(void* ptr) BOOST_NOEXCEPT { ::free(ptr); } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/alignment_of.hpp b/boost/align/detail/alignment_of.hpp index f3f6192..b6fc3dc 100644 --- a/boost/align/detail/alignment_of.hpp +++ b/boost/align/detail/alignment_of.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP #define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP @@ -16,17 +15,17 @@ namespace alignment { namespace detail { template<class T> -struct alignof_helper { +struct offset_value { char value; T object; }; template<class T> struct alignment_of - : min_size<sizeof(T), sizeof(alignof_helper<T>) - sizeof(T)> { }; + : min_size<sizeof(T), sizeof(offset_value<T>) - sizeof(T)> { }; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/alignment_of_clang.hpp b/boost/align/detail/alignment_of_clang.hpp index f550156..95773e5 100644 --- a/boost/align/detail/alignment_of_clang.hpp +++ b/boost/align/detail/alignment_of_clang.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CLANG_HPP #define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CLANG_HPP @@ -20,8 +19,8 @@ template<class T> struct alignment_of : integral_constant<std::size_t, __alignof(T)> { }; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/alignment_of_codegear.hpp b/boost/align/detail/alignment_of_codegear.hpp index 8948309..ea6f904 100644 --- a/boost/align/detail/alignment_of_codegear.hpp +++ b/boost/align/detail/alignment_of_codegear.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CODEGEAR_HPP #define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CODEGEAR_HPP @@ -20,8 +19,8 @@ template<class T> struct alignment_of : integral_constant<std::size_t, alignof(T)> { }; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/alignment_of_cxx11.hpp b/boost/align/detail/alignment_of_cxx11.hpp index cbe2d9e..05c7429 100644 --- a/boost/align/detail/alignment_of_cxx11.hpp +++ b/boost/align/detail/alignment_of_cxx11.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP #define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP @@ -17,8 +16,8 @@ namespace detail { using std::alignment_of; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/alignment_of_gcc.hpp b/boost/align/detail/alignment_of_gcc.hpp index ffd8294..66a63a5 100644 --- a/boost/align/detail/alignment_of_gcc.hpp +++ b/boost/align/detail/alignment_of_gcc.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_GCC_HPP #define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_GCC_HPP @@ -20,8 +19,8 @@ template<class T> struct alignment_of : integral_constant<std::size_t, __alignof__(T)> { }; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/alignment_of_msvc.hpp b/boost/align/detail/alignment_of_msvc.hpp index cdd7c47..1526c7c 100644 --- a/boost/align/detail/alignment_of_msvc.hpp +++ b/boost/align/detail/alignment_of_msvc.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_MSVC_HPP #define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_MSVC_HPP @@ -16,7 +15,7 @@ namespace alignment { namespace detail { template<class T> -struct alignof_helper { +struct offset_value { T first; char value; T second; @@ -25,10 +24,10 @@ struct alignof_helper { template<class T> struct alignment_of : min_size<sizeof(T), - sizeof(alignof_helper<T>) - (sizeof(T) << 1)> { }; + sizeof(offset_value<T>) - (sizeof(T) << 1)> { }; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/assume_aligned.hpp b/boost/align/detail/assume_aligned.hpp index a1c632b..d218d8c 100644 --- a/boost/align/detail/assume_aligned.hpp +++ b/boost/align/detail/assume_aligned.hpp @@ -1,17 +1,16 @@ /* -(c) 2015 NumScale SAS -(c) 2015 LRI UMR 8623 CNRS/University Paris Sud XI +Copyright 2015 NumScale SAS +Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_HPP #define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_HPP -#define BOOST_ALIGN_ASSUME_ALIGNED(p, n) +#define BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment) #endif diff --git a/boost/align/detail/assume_aligned_clang.hpp b/boost/align/detail/assume_aligned_clang.hpp index d57cf4f..4c7159f 100644 --- a/boost/align/detail/assume_aligned_clang.hpp +++ b/boost/align/detail/assume_aligned_clang.hpp @@ -1,17 +1,16 @@ /* -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_CLANG_HPP #define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_CLANG_HPP #if __has_builtin(__builtin_assume_aligned) #define BOOST_ALIGN_ASSUME_ALIGNED(p, n) \ -(p) = (__typeof__(p))(__builtin_assume_aligned((p), (n))) +(p) = static_cast<__typeof__(p)>(__builtin_assume_aligned((p), (n))) #else #define BOOST_ALIGN_ASSUME_ALIGNED(p, n) #endif diff --git a/boost/align/detail/assume_aligned_gcc.hpp b/boost/align/detail/assume_aligned_gcc.hpp index fc6d76a..1173444 100644 --- a/boost/align/detail/assume_aligned_gcc.hpp +++ b/boost/align/detail/assume_aligned_gcc.hpp @@ -1,18 +1,17 @@ /* -(c) 2015 NumScale SAS -(c) 2015 LRI UMR 8623 CNRS/University Paris Sud XI +Copyright 2015 NumScale SAS +Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_GCC_HPP #define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_GCC_HPP #define BOOST_ALIGN_ASSUME_ALIGNED(p, n) \ -(p) = (__typeof__(p))(__builtin_assume_aligned((p), (n))) +(p) = static_cast<__typeof__(p)>(__builtin_assume_aligned((p), (n))) #endif diff --git a/boost/align/detail/assume_aligned_intel.hpp b/boost/align/detail/assume_aligned_intel.hpp index 1944f3d..6792ce0 100644 --- a/boost/align/detail/assume_aligned_intel.hpp +++ b/boost/align/detail/assume_aligned_intel.hpp @@ -1,18 +1,17 @@ /* -(c) 2015 NumScale SAS -(c) 2015 LRI UMR 8623 CNRS/University Paris Sud XI +Copyright 2015 NumScale SAS +Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_INTEL_HPP #define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_INTEL_HPP -#define BOOST_ALIGN_ASSUME_ALIGNED(p, n) \ -__assume_aligned((p), (n)) +#define BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment) \ +__assume_aligned((ptr), (alignment)) #endif diff --git a/boost/align/detail/assume_aligned_msvc.hpp b/boost/align/detail/assume_aligned_msvc.hpp index e953333..75ac7e1 100644 --- a/boost/align/detail/assume_aligned_msvc.hpp +++ b/boost/align/detail/assume_aligned_msvc.hpp @@ -1,20 +1,19 @@ /* -(c) 2015 NumScale SAS -(c) 2015 LRI UMR 8623 CNRS/University Paris Sud XI +Copyright 2015 NumScale SAS +Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_MSVC_HPP #define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_MSVC_HPP #include <cstddef> -#define BOOST_ALIGN_ASSUME_ALIGNED(p, n) \ -__assume(((std::size_t)(p) & ((n) - 1)) == 0) +#define BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment) \ +__assume((reinterpret_cast<std::size_t>(ptr) & ((alignment) - 1)) == 0) #endif diff --git a/boost/align/detail/element_type.hpp b/boost/align/detail/element_type.hpp index 69995e1..5b2b732 100644 --- a/boost/align/detail/element_type.hpp +++ b/boost/align/detail/element_type.hpp @@ -1,10 +1,9 @@ /* -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP #define BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP @@ -49,45 +48,44 @@ struct remove_all_extents { }; template<class T> -struct remove_all_extents<T[]> - : remove_all_extents<T> { }; +struct remove_all_extents<T[]> { + typedef typename remove_all_extents<T>::type type; +}; template<class T, std::size_t N> -struct remove_all_extents<T[N]> - : remove_all_extents<T> { }; +struct remove_all_extents<T[N]> { + typedef typename remove_all_extents<T>::type type; +}; template<class T> -struct remove_const { +struct remove_cv { typedef T type; }; template<class T> -struct remove_const<const T> { +struct remove_cv<const T> { typedef T type; }; template<class T> -struct remove_volatile { +struct remove_cv<volatile T> { typedef T type; }; template<class T> -struct remove_volatile<volatile T> { +struct remove_cv<const volatile T> { typedef T type; }; - -template<class T> -struct remove_cv - : remove_volatile<typename remove_const<T>::type> { }; #endif template<class T> -struct element_type - : remove_cv<typename remove_all_extents<typename - remove_reference<T>::type>::type> { }; +struct element_type { + typedef typename remove_cv<typename remove_all_extents<typename + remove_reference<T>::type>::type>::type type; +}; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/integral_constant.hpp b/boost/align/detail/integral_constant.hpp index 1ad67e3..8600967 100644 --- a/boost/align/detail/integral_constant.hpp +++ b/boost/align/detail/integral_constant.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2016 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2016 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP #define BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP @@ -37,10 +36,13 @@ struct integral_constant { BOOST_STATIC_CONSTEXPR T value = Value; }; + +template<class T, T Value> +BOOST_CONSTEXPR_OR_CONST T integral_constant<T, Value>::value; #endif -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/is_aligned.hpp b/boost/align/detail/is_aligned.hpp index e7c7dd6..61982c4 100644 --- a/boost/align/detail/is_aligned.hpp +++ b/boost/align/detail/is_aligned.hpp @@ -1,36 +1,34 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_IS_ALIGNED_HPP #define BOOST_ALIGN_DETAIL_IS_ALIGNED_HPP #include <boost/align/detail/is_alignment.hpp> -#include <boost/align/is_aligned_forward.hpp> #include <boost/assert.hpp> namespace boost { namespace alignment { -inline bool is_aligned(const void* ptr, std::size_t alignment) - BOOST_NOEXCEPT +inline bool +is_aligned(const void* ptr, std::size_t alignment) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); - return is_aligned((std::size_t)ptr, alignment); + return (reinterpret_cast<std::size_t>(ptr) & (alignment - 1)) == 0; } -inline bool is_aligned(std::size_t alignment, const void* ptr) - BOOST_NOEXCEPT +inline bool +is_aligned(std::size_t alignment, const void* ptr) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); - return is_aligned((std::size_t)ptr, alignment); + return (reinterpret_cast<std::size_t>(ptr) & (alignment - 1)) == 0; } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/is_alignment.hpp b/boost/align/detail/is_alignment.hpp index 12d8df9..8bedba1 100644 --- a/boost/align/detail/is_alignment.hpp +++ b/boost/align/detail/is_alignment.hpp @@ -1,10 +1,10 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt */ #ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP #define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP @@ -16,14 +16,14 @@ namespace boost { namespace alignment { namespace detail { -BOOST_CONSTEXPR inline bool is_alignment(std::size_t value) - BOOST_NOEXCEPT +BOOST_CONSTEXPR inline bool +is_alignment(std::size_t value) BOOST_NOEXCEPT { return (value > 0) && ((value & (value - 1)) == 0); } -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/is_alignment_constant.hpp b/boost/align/detail/is_alignment_constant.hpp index eb709b7..0ded628 100644 --- a/boost/align/detail/is_alignment_constant.hpp +++ b/boost/align/detail/is_alignment_constant.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_CONSTANT_HPP #define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_CONSTANT_HPP @@ -20,8 +19,8 @@ template<std::size_t N> struct is_alignment_constant : integral_constant<bool, (N > 0) && ((N & (N - 1)) == 0)> { }; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/max_align.hpp b/boost/align/detail/max_align.hpp index d91de0d..9c09fec 100644 --- a/boost/align/detail/max_align.hpp +++ b/boost/align/detail/max_align.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_MAX_ALIGN_HPP #define BOOST_ALIGN_DETAIL_MAX_ALIGN_HPP @@ -20,8 +19,8 @@ template<class A, class B> struct max_align : max_size<alignment_of<A>::value, alignment_of<B>::value> { }; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/max_objects.hpp b/boost/align/detail/max_objects.hpp index 27d377c..9fdd30e 100644 --- a/boost/align/detail/max_objects.hpp +++ b/boost/align/detail/max_objects.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_MAX_OBJECTS_HPP #define BOOST_ALIGN_DETAIL_MAX_OBJECTS_HPP @@ -21,8 +20,8 @@ struct max_objects : integral_constant<std::size_t, ~static_cast<std::size_t>(0) / sizeof(T)> { }; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/max_size.hpp b/boost/align/detail/max_size.hpp index 555aa2c..22cefdb 100644 --- a/boost/align/detail/max_size.hpp +++ b/boost/align/detail/max_size.hpp @@ -1,10 +1,9 @@ /* -(c) 2014-2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_MAX_SIZE_HPP #define BOOST_ALIGN_DETAIL_MAX_SIZE_HPP @@ -20,8 +19,8 @@ template<std::size_t A, std::size_t B> struct max_size : integral_constant<std::size_t, (A > B) ? A : B> { }; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/detail/min_size.hpp b/boost/align/detail/min_size.hpp index b20d3cd..5b478fd 100644 --- a/boost/align/detail/min_size.hpp +++ b/boost/align/detail/min_size.hpp @@ -1,10 +1,9 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_MIN_SIZE_HPP #define BOOST_ALIGN_DETAIL_MIN_SIZE_HPP @@ -20,8 +19,8 @@ template<std::size_t A, std::size_t B> struct min_size : integral_constant<std::size_t, (A < B) ? A : B> { }; -} /* .detail */ -} /* .alignment */ -} /* .boost */ +} /* detail */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/is_aligned.hpp b/boost/align/is_aligned.hpp index cbace96..c8266d0 100644 --- a/boost/align/is_aligned.hpp +++ b/boost/align/is_aligned.hpp @@ -1,27 +1,26 @@ /* -(c) 2014 Glen Joseph Fernandes -<glenjofe -at- gmail.com> +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt */ #ifndef BOOST_ALIGN_IS_ALIGNED_HPP #define BOOST_ALIGN_IS_ALIGNED_HPP #include <boost/align/detail/is_aligned.hpp> -#include <boost/align/is_aligned_forward.hpp> namespace boost { namespace alignment { -BOOST_CONSTEXPR inline bool is_aligned(std::size_t value, - std::size_t alignment) BOOST_NOEXCEPT +BOOST_CONSTEXPR inline bool +is_aligned(std::size_t value, std::size_t alignment) BOOST_NOEXCEPT { return (value & (alignment - 1)) == 0; } -} /* .alignment */ -} /* .boost */ +} /* alignment */ +} /* boost */ #endif diff --git a/boost/align/is_aligned_forward.hpp b/boost/align/is_aligned_forward.hpp deleted file mode 100644 index d1bcbc1..0000000 --- a/boost/align/is_aligned_forward.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/* -(c) 2015 Glen Joseph Fernandes -<glenjofe -at- gmail.com> - -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt -*/ -#ifndef BOOST_ALIGN_IS_ALIGNED_FORWARD_HPP -#define BOOST_ALIGN_IS_ALIGNED_FORWARD_HPP - -#include <boost/config.hpp> -#include <cstddef> - -namespace boost { -namespace alignment { - -BOOST_CONSTEXPR bool is_aligned(std::size_t value, - std::size_t alignment) BOOST_NOEXCEPT; - -} /* .alignment */ -} /* .boost */ - -#endif diff --git a/boost/any.hpp b/boost/any.hpp index 437de2c..9f6b313 100644 --- a/boost/any.hpp +++ b/boost/any.hpp @@ -16,7 +16,7 @@ #include <algorithm> -#include "boost/config.hpp" +#include <boost/config.hpp> #include <boost/type_index.hpp> #include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/decay.hpp> @@ -27,6 +27,7 @@ #include <boost/throw_exception.hpp> #include <boost/static_assert.hpp> #include <boost/utility/enable_if.hpp> +#include <boost/core/addressof.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/type_traits/is_const.hpp> #include <boost/mpl/if.hpp> @@ -244,7 +245,9 @@ namespace boost ValueType * any_cast(any * operand) BOOST_NOEXCEPT { return operand && operand->type() == boost::typeindex::type_id<ValueType>() - ? &static_cast<any::holder<BOOST_DEDUCED_TYPENAME remove_cv<ValueType>::type> *>(operand->content)->held + ? boost::addressof( + static_cast<any::holder<BOOST_DEDUCED_TYPENAME remove_cv<ValueType>::type> *>(operand->content)->held + ) : 0; } @@ -260,7 +263,7 @@ namespace boost typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref; - nonref * result = any_cast<nonref>(&operand); + nonref * result = any_cast<nonref>(boost::addressof(operand)); if(!result) boost::throw_exception(bad_any_cast()); @@ -274,7 +277,14 @@ namespace boost BOOST_DEDUCED_TYPENAME boost::add_reference<ValueType>::type >::type ref_type; +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4172) // "returning address of local variable or temporary" but *result is not local! +#endif return static_cast<ref_type>(*result); +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif } template<typename ValueType> @@ -306,7 +316,9 @@ namespace boost template<typename ValueType> inline ValueType * unsafe_any_cast(any * operand) BOOST_NOEXCEPT { - return &static_cast<any::holder<ValueType> *>(operand->content)->held; + return boost::addressof( + static_cast<any::holder<ValueType> *>(operand->content)->held + ); } template<typename ValueType> diff --git a/boost/archive/basic_binary_iprimitive.hpp b/boost/archive/basic_binary_iprimitive.hpp index 40f45d9..665d3e8 100644 --- a/boost/archive/basic_binary_iprimitive.hpp +++ b/boost/archive/basic_binary_iprimitive.hpp @@ -50,7 +50,7 @@ namespace std{ //#include <boost/mpl/placeholders.hpp> #include <boost/serialization/is_bitwise_serializable.hpp> -#include <boost/serialization/array.hpp> +#include <boost/serialization/array_wrapper.hpp> #include <boost/archive/basic_streambuf_locale_saver.hpp> #include <boost/archive/codecvt_null.hpp> diff --git a/boost/archive/basic_binary_oprimitive.hpp b/boost/archive/basic_binary_oprimitive.hpp index 4b7f454..6dc770c 100644 --- a/boost/archive/basic_binary_oprimitive.hpp +++ b/boost/archive/basic_binary_oprimitive.hpp @@ -45,7 +45,7 @@ namespace std{ //#include <boost/mpl/placeholders.hpp> #include <boost/serialization/is_bitwise_serializable.hpp> -#include <boost/serialization/array.hpp> +#include <boost/serialization/array_wrapper.hpp> #include <boost/archive/basic_streambuf_locale_saver.hpp> #include <boost/archive/codecvt_null.hpp> diff --git a/boost/archive/basic_text_oprimitive.hpp b/boost/archive/basic_text_oprimitive.hpp index c9f8c59..45f0935 100644 --- a/boost/archive/basic_text_oprimitive.hpp +++ b/boost/archive/basic_text_oprimitive.hpp @@ -175,8 +175,6 @@ protected: template<class T> void save(const T & t){ - boost::io::ios_flags_saver fs(os); - boost::io::ios_precision_saver ps(os); typename is_float<T>::type tf; save_impl(t, tf); } diff --git a/boost/archive/basic_xml_iarchive.hpp b/boost/archive/basic_xml_iarchive.hpp index a882df5..e9f7482 100644 --- a/boost/archive/basic_xml_iarchive.hpp +++ b/boost/archive/basic_xml_iarchive.hpp @@ -89,8 +89,7 @@ protected: // leaving the archive in an undetermined state BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_override(class_id_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load_override(class_id_optional_type & /* t */){} + void load_override(class_id_optional_type & /* t */){} BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_override(object_id_type & t); BOOST_ARCHIVE_OR_WARCHIVE_DECL void diff --git a/boost/archive/detail/iserializer.hpp b/boost/archive/detail/iserializer.hpp index 6bec499..6e02eec 100644 --- a/boost/archive/detail/iserializer.hpp +++ b/boost/archive/detail/iserializer.hpp @@ -77,10 +77,10 @@ namespace std{ #include <boost/serialization/type_info_implementation.hpp> #include <boost/serialization/nvp.hpp> #include <boost/serialization/void_cast.hpp> -#include <boost/serialization/array.hpp> #include <boost/serialization/collection_size_type.hpp> #include <boost/serialization/singleton.hpp> #include <boost/serialization/wrapper.hpp> +#include <boost/serialization/array_wrapper.hpp> // the following is need only for dynamic cast of polymorphic pointers #include <boost/archive/archive_exception.hpp> @@ -588,7 +588,14 @@ struct load_array_type { boost::archive::archive_exception::array_size_too_short ) ); - ar >> serialization::make_array(static_cast<value_type*>(&t[0]),count); + // explict template arguments to pass intel C++ compiler + ar >> serialization::make_array< + value_type, + boost::serialization::collection_size_type + >( + static_cast<value_type *>(&t[0]), + count + ); } }; diff --git a/boost/archive/detail/oserializer.hpp b/boost/archive/detail/oserializer.hpp index 0f2e733..c120ec5 100644 --- a/boost/archive/detail/oserializer.hpp +++ b/boost/archive/detail/oserializer.hpp @@ -56,8 +56,9 @@ #include <boost/serialization/type_info_implementation.hpp> #include <boost/serialization/nvp.hpp> #include <boost/serialization/void_cast.hpp> -#include <boost/serialization/array.hpp> #include <boost/serialization/collection_size_type.hpp> +#include <boost/serialization/array_wrapper.hpp> + #include <boost/serialization/singleton.hpp> #include <boost/archive/archive_exception.hpp> @@ -501,7 +502,14 @@ struct save_array_type ); boost::serialization::collection_size_type count(c); ar << BOOST_SERIALIZATION_NVP(count); - ar << serialization::make_array(static_cast<value_type const*>(&t[0]),count); + // explict template arguments to pass intel C++ compiler + ar << serialization::make_array< + const value_type, + boost::serialization::collection_size_type + >( + static_cast<const value_type *>(&t[0]), + count + ); } }; diff --git a/boost/archive/detail/utf8_codecvt_facet.hpp b/boost/archive/detail/utf8_codecvt_facet.hpp index dfbec6b..a40104a 100644 --- a/boost/archive/detail/utf8_codecvt_facet.hpp +++ b/boost/archive/detail/utf8_codecvt_facet.hpp @@ -9,11 +9,14 @@ #include <boost/config.hpp> -// std::codecvt_utf8 doesn't seem to work for msvc -// versions prior to MSVC 14.0 +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#endif -#if defined(_MSC_VER) && _MSC_VER < 1900 \ -|| defined( BOOST_NO_CXX11_HDR_CODECVT ) +// std::codecvt_utf8 doesn't seem to work for any versions of msvc + +#if defined(_MSC_VER) || defined(BOOST_NO_CXX11_HDR_CODECVT) + // use boost's utf8 codecvt facet #include <boost/archive/detail/decl.hpp> #define BOOST_UTF8_BEGIN_NAMESPACE \ namespace boost { namespace archive { namespace detail { @@ -26,9 +29,11 @@ #undef BOOST_UTF8_DECL #undef BOOST_UTF8_BEGIN_NAMESPACE #else + // use the standard vendor supplied facet #include <codecvt> namespace boost { namespace archive { namespace detail { typedef std::codecvt_utf8<wchar_t> utf8_codecvt_facet; } } } -#endif // BOOST_NO_CXX11_HDR_CODECVT +#endif + #endif // BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP diff --git a/boost/archive/iterators/mb_from_wchar.hpp b/boost/archive/iterators/mb_from_wchar.hpp index d5110de..b6dc9b2 100644 --- a/boost/archive/iterators/mb_from_wchar.hpp +++ b/boost/archive/iterators/mb_from_wchar.hpp @@ -26,6 +26,7 @@ namespace std{ using ::mbstate_t; } // namespace std #endif + #include <boost/archive/detail/utf8_codecvt_facet.hpp> #include <boost/iterator/iterator_adaptor.hpp> diff --git a/boost/array.hpp b/boost/array.hpp index fa06fa9..210c072 100644 --- a/boost/array.hpp +++ b/boost/array.hpp @@ -13,6 +13,7 @@ * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * + * 9 Jan 2013 - (mtc) Added constexpr * 14 Apr 2012 - (mtc) Added support for boost::hash * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility. * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group. @@ -42,12 +43,12 @@ #include <cstddef> #include <stdexcept> #include <boost/assert.hpp> +#include <boost/static_assert.hpp> #include <boost/swap.hpp> // Handles broken standard libraries better than <iterator> #include <boost/detail/iterator.hpp> #include <boost/throw_exception.hpp> -#include <boost/functional/hash_fwd.hpp> #include <algorithm> // FIXES for broken compilers @@ -81,15 +82,9 @@ namespace boost { const_iterator cend() const { return elems+N; } // reverse iterator support -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) +#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; -#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) - // workaround for broken reverse_iterator in VC7 - typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator, - reference, iterator, reference> > reverse_iterator; - typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator, - const_reference, iterator, reference> > const_reverse_iterator; #elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, value_type, reference, iterator, difference_type> reverse_iterator; @@ -120,19 +115,17 @@ namespace boost { // operator[] reference operator[](size_type i) { - BOOST_ASSERT_MSG( i < N, "out of range" ); - return elems[i]; + return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i]; } - const_reference operator[](size_type i) const + /*BOOST_CONSTEXPR*/ const_reference operator[](size_type i) const { - BOOST_ASSERT_MSG( i < N, "out of range" ); - return elems[i]; + return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i]; } // at() with range check - reference at(size_type i) { rangecheck(i); return elems[i]; } - const_reference at(size_type i) const { rangecheck(i); return elems[i]; } + reference at(size_type i) { return rangecheck(i), elems[i]; } + /*BOOST_CONSTEXPR*/ const_reference at(size_type i) const { return rangecheck(i), elems[i]; } // front() and back() reference front() @@ -140,7 +133,7 @@ namespace boost { return elems[0]; } - const_reference front() const + BOOST_CONSTEXPR const_reference front() const { return elems[0]; } @@ -150,15 +143,15 @@ namespace boost { return elems[N-1]; } - const_reference back() const + BOOST_CONSTEXPR const_reference back() const { return elems[N-1]; } // size is constant - static size_type size() { return N; } - static bool empty() { return false; } - static size_type max_size() { return N; } + static BOOST_CONSTEXPR size_type size() { return N; } + static BOOST_CONSTEXPR bool empty() { return false; } + static BOOST_CONSTEXPR size_type max_size() { return N; } enum { static_size = N }; // swap (note: linear complexity) @@ -189,16 +182,12 @@ namespace boost { } // check range (may be private because it is static) - static void rangecheck (size_type i) { - if (i >= size()) { - std::out_of_range e("array<>: index out of range"); - boost::throw_exception(e); - } + static BOOST_CONSTEXPR bool rangecheck (size_type i) { + return i > size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true; } }; -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< class T > class array< T, 0 > { @@ -222,15 +211,9 @@ namespace boost { const_iterator cend() const { return cbegin(); } // reverse iterator support -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) +#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; -#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) - // workaround for broken reverse_iterator in VC7 - typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator, - reference, iterator, reference> > reverse_iterator; - typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator, - const_reference, iterator, reference> > const_reverse_iterator; #elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, value_type, reference, iterator, difference_type> reverse_iterator; @@ -264,14 +247,14 @@ namespace boost { return failed_rangecheck(); } - const_reference operator[](size_type /*i*/) const + /*BOOST_CONSTEXPR*/ const_reference operator[](size_type /*i*/) const { return failed_rangecheck(); } // at() with range check reference at(size_type /*i*/) { return failed_rangecheck(); } - const_reference at(size_type /*i*/) const { return failed_rangecheck(); } + /*BOOST_CONSTEXPR*/ const_reference at(size_type /*i*/) const { return failed_rangecheck(); } // front() and back() reference front() @@ -279,7 +262,7 @@ namespace boost { return failed_rangecheck(); } - const_reference front() const + BOOST_CONSTEXPR const_reference front() const { return failed_rangecheck(); } @@ -289,15 +272,15 @@ namespace boost { return failed_rangecheck(); } - const_reference back() const + BOOST_CONSTEXPR const_reference back() const { return failed_rangecheck(); } // size is constant - static size_type size() { return 0; } - static bool empty() { return true; } - static size_type max_size() { return 0; } + static BOOST_CONSTEXPR size_type size() { return 0; } + static BOOST_CONSTEXPR bool empty() { return true; } + static BOOST_CONSTEXPR size_type max_size() { return 0; } enum { static_size = 0 }; void swap (array<T,0>& /*y*/) { @@ -335,7 +318,6 @@ namespace boost { #endif } }; -#endif // comparisons template<class T, std::size_t N> @@ -391,7 +373,7 @@ namespace boost { // Specific for boost::array: simply returns its elems data member. template <typename T, std::size_t N> - typename const detail::c_array<T,N>::type& get_c_array(const boost::array<T,N>& arg) + typename detail::c_array<T,N>::type const& get_c_array(const boost::array<T,N>& arg) { return arg.elems; } @@ -429,6 +411,7 @@ namespace boost { } #endif + template <class It> std::size_t hash_range(It, It); template<class T, std::size_t N> std::size_t hash_value(const array<T,N>& arr) @@ -436,8 +419,36 @@ namespace boost { return boost::hash_range(arr.begin(), arr.end()); } + template <size_t Idx, typename T, size_t N> + T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(boost::array &) index out of range" ); + return arr[Idx]; + } + + template <size_t Idx, typename T, size_t N> + const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(const boost::array &) index out of range" ); + return arr[Idx]; + } + } /* namespace boost */ +#ifndef BOOST_NO_CXX11_HDR_ARRAY +// If we don't have std::array, I'm assuming that we don't have std::get +namespace std { + template <size_t Idx, typename T, size_t N> + T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(boost::array &) index out of range" ); + return arr[Idx]; + } + + template <size_t Idx, typename T, size_t N> + const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(const boost::array &) index out of range" ); + return arr[Idx]; + } +} +#endif #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) # pragma warning(pop) diff --git a/boost/asio.hpp b/boost/asio.hpp index 6523d60..114d871 100644 --- a/boost/asio.hpp +++ b/boost/asio.hpp @@ -2,7 +2,7 @@ // asio.hpp // ~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/async_result.hpp b/boost/asio/async_result.hpp index e5717b4..6290b84 100644 --- a/boost/asio/async_result.hpp +++ b/boost/asio/async_result.hpp @@ -2,7 +2,7 @@ // async_result.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_datagram_socket.hpp b/boost/asio/basic_datagram_socket.hpp index d898a7f..22801ee 100644 --- a/boost/asio/basic_datagram_socket.hpp +++ b/boost/asio/basic_datagram_socket.hpp @@ -2,7 +2,7 @@ // basic_datagram_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_deadline_timer.hpp b/boost/asio/basic_deadline_timer.hpp index b6c83f5..9303700 100644 --- a/boost/asio/basic_deadline_timer.hpp +++ b/boost/asio/basic_deadline_timer.hpp @@ -2,7 +2,7 @@ // basic_deadline_timer.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_io_object.hpp b/boost/asio/basic_io_object.hpp index 5912228..d490a16 100644 --- a/boost/asio/basic_io_object.hpp +++ b/boost/asio/basic_io_object.hpp @@ -2,7 +2,7 @@ // basic_io_object.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -113,6 +113,11 @@ protected: * @note Available only for services that support movability, */ basic_io_object& operator=(basic_io_object&& other); + + /// Perform a converting move-construction of a basic_io_object. + template <typename IoObjectService1> + basic_io_object(IoObjectService1& other_service, + typename IoObjectService1::implementation_type& other_implementation); #endif // defined(GENERATING_DOCUMENTATION) /// Protected destructor to prevent deletion through this type. @@ -192,6 +197,16 @@ protected: service_->move_construct(implementation, other.implementation); } + template <typename IoObjectService1> + basic_io_object(IoObjectService1& other_service, + typename IoObjectService1::implementation_type& other_implementation) + : service_(&boost::asio::use_service<IoObjectService>( + other_service.get_io_service())) + { + service_->converting_move_construct(implementation, + other_service, other_implementation); + } + ~basic_io_object() { service_->destroy(implementation); diff --git a/boost/asio/basic_raw_socket.hpp b/boost/asio/basic_raw_socket.hpp index 2fe3e60..85f8f42 100644 --- a/boost/asio/basic_raw_socket.hpp +++ b/boost/asio/basic_raw_socket.hpp @@ -2,7 +2,7 @@ // basic_raw_socket.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_seq_packet_socket.hpp b/boost/asio/basic_seq_packet_socket.hpp index 4a2fec7..c8e43f7 100644 --- a/boost/asio/basic_seq_packet_socket.hpp +++ b/boost/asio/basic_seq_packet_socket.hpp @@ -2,7 +2,7 @@ // basic_seq_packet_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_serial_port.hpp b/boost/asio/basic_serial_port.hpp index 7914457..bfc78af 100644 --- a/boost/asio/basic_serial_port.hpp +++ b/boost/asio/basic_serial_port.hpp @@ -2,7 +2,7 @@ // basic_serial_port.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/basic_signal_set.hpp b/boost/asio/basic_signal_set.hpp index cc26d6f..608bc0a 100644 --- a/boost/asio/basic_signal_set.hpp +++ b/boost/asio/basic_signal_set.hpp @@ -2,7 +2,7 @@ // basic_signal_set.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_socket.hpp b/boost/asio/basic_socket.hpp index 64aef6f..777f6a9 100644 --- a/boost/asio/basic_socket.hpp +++ b/boost/asio/basic_socket.hpp @@ -2,7 +2,7 @@ // basic_socket.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -193,10 +193,9 @@ public: template <typename Protocol1, typename SocketService1> basic_socket(basic_socket<Protocol1, SocketService1>&& other, typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0) - : basic_io_object<SocketService>(other.get_io_service()) + : basic_io_object<SocketService>( + other.get_service(), other.get_implementation()) { - this->get_service().template converting_move_construct<Protocol1>( - this->get_implementation(), other.get_implementation()); } /// Move-assign a basic_socket from a socket of another protocol type. diff --git a/boost/asio/basic_socket_acceptor.hpp b/boost/asio/basic_socket_acceptor.hpp index f39c407..f1d2b8e 100644 --- a/boost/asio/basic_socket_acceptor.hpp +++ b/boost/asio/basic_socket_acceptor.hpp @@ -2,7 +2,7 @@ // basic_socket_acceptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -232,10 +232,9 @@ public: basic_socket_acceptor( basic_socket_acceptor<Protocol1, SocketAcceptorService1>&& other, typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0) - : basic_io_object<SocketAcceptorService>(other.get_io_service()) + : basic_io_object<SocketAcceptorService>( + other.get_service(), other.get_implementation()) { - this->get_service().template converting_move_construct<Protocol1>( - this->get_implementation(), other.get_implementation()); } /// Move-assign a basic_socket_acceptor from an acceptor of another protocol diff --git a/boost/asio/basic_socket_iostream.hpp b/boost/asio/basic_socket_iostream.hpp index fd291f0..6ed71f7 100644 --- a/boost/asio/basic_socket_iostream.hpp +++ b/boost/asio/basic_socket_iostream.hpp @@ -2,7 +2,7 @@ // basic_socket_iostream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_socket_streambuf.hpp b/boost/asio/basic_socket_streambuf.hpp index 34052e4..922b005 100644 --- a/boost/asio/basic_socket_streambuf.hpp +++ b/boost/asio/basic_socket_streambuf.hpp @@ -2,7 +2,7 @@ // basic_socket_streambuf.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_stream_socket.hpp b/boost/asio/basic_stream_socket.hpp index 423a5c3..5b959d7 100644 --- a/boost/asio/basic_stream_socket.hpp +++ b/boost/asio/basic_stream_socket.hpp @@ -2,7 +2,7 @@ // basic_stream_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_streambuf.hpp b/boost/asio/basic_streambuf.hpp index 5c575dd..1392596 100644 --- a/boost/asio/basic_streambuf.hpp +++ b/boost/asio/basic_streambuf.hpp @@ -2,7 +2,7 @@ // basic_streambuf.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_streambuf_fwd.hpp b/boost/asio/basic_streambuf_fwd.hpp index 88e9549..f3e006b 100644 --- a/boost/asio/basic_streambuf_fwd.hpp +++ b/boost/asio/basic_streambuf_fwd.hpp @@ -2,7 +2,7 @@ // basic_streambuf_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_waitable_timer.hpp b/boost/asio/basic_waitable_timer.hpp index a7293ee..e4aeb0b 100644 --- a/boost/asio/basic_waitable_timer.hpp +++ b/boost/asio/basic_waitable_timer.hpp @@ -2,7 +2,7 @@ // basic_waitable_timer.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffer.hpp b/boost/asio/buffer.hpp index 4dd02d1..700654d 100644 --- a/boost/asio/buffer.hpp +++ b/boost/asio/buffer.hpp @@ -2,7 +2,7 @@ // buffer.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_read_stream.hpp b/boost/asio/buffered_read_stream.hpp index 90e135e..ece138b 100644 --- a/boost/asio/buffered_read_stream.hpp +++ b/boost/asio/buffered_read_stream.hpp @@ -2,7 +2,7 @@ // buffered_read_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_read_stream_fwd.hpp b/boost/asio/buffered_read_stream_fwd.hpp index 5c2af0d..3ffac04 100644 --- a/boost/asio/buffered_read_stream_fwd.hpp +++ b/boost/asio/buffered_read_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_read_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_stream.hpp b/boost/asio/buffered_stream.hpp index 3c25b5f..fae7c27 100644 --- a/boost/asio/buffered_stream.hpp +++ b/boost/asio/buffered_stream.hpp @@ -2,7 +2,7 @@ // buffered_stream.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_stream_fwd.hpp b/boost/asio/buffered_stream_fwd.hpp index 83498c0..a1e965b 100644 --- a/boost/asio/buffered_stream_fwd.hpp +++ b/boost/asio/buffered_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_write_stream.hpp b/boost/asio/buffered_write_stream.hpp index f1b951c..5b8f313 100644 --- a/boost/asio/buffered_write_stream.hpp +++ b/boost/asio/buffered_write_stream.hpp @@ -2,7 +2,7 @@ // buffered_write_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_write_stream_fwd.hpp b/boost/asio/buffered_write_stream_fwd.hpp index 97b5a3e..4759cf2 100644 --- a/boost/asio/buffered_write_stream_fwd.hpp +++ b/boost/asio/buffered_write_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_write_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffers_iterator.hpp b/boost/asio/buffers_iterator.hpp index 70dc874..c64b341 100644 --- a/boost/asio/buffers_iterator.hpp +++ b/boost/asio/buffers_iterator.hpp @@ -2,7 +2,7 @@ // buffers_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/completion_condition.hpp b/boost/asio/completion_condition.hpp index 7fbd048..d64efff 100644 --- a/boost/asio/completion_condition.hpp +++ b/boost/asio/completion_condition.hpp @@ -2,7 +2,7 @@ // completion_condition.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/connect.hpp b/boost/asio/connect.hpp index 6275a5d..635a8ad 100644 --- a/boost/asio/connect.hpp +++ b/boost/asio/connect.hpp @@ -2,7 +2,7 @@ // connect.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/coroutine.hpp b/boost/asio/coroutine.hpp index 642b484..c4763f8 100644 --- a/boost/asio/coroutine.hpp +++ b/boost/asio/coroutine.hpp @@ -2,7 +2,7 @@ // coroutine.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/datagram_socket_service.hpp b/boost/asio/datagram_socket_service.hpp index 04a5367..95f179a 100644 --- a/boost/asio/datagram_socket_service.hpp +++ b/boost/asio/datagram_socket_service.hpp @@ -2,7 +2,7 @@ // datagram_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -118,17 +118,21 @@ public: service_impl_.move_assign(impl, other_service.service_impl_, other_impl); } + // All socket services have access to each other's implementations. + template <typename Protocol1> friend class datagram_socket_service; + /// Move-construct a new datagram socket implementation from another protocol /// type. template <typename Protocol1> void converting_move_construct(implementation_type& impl, + datagram_socket_service<Protocol1>& other_service, typename datagram_socket_service< Protocol1>::implementation_type& other_impl, typename enable_if<is_convertible< Protocol1, Protocol>::value>::type* = 0) { service_impl_.template converting_move_construct<Protocol1>( - impl, other_impl); + impl, other_service.service_impl_, other_impl); } #endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) diff --git a/boost/asio/deadline_timer.hpp b/boost/asio/deadline_timer.hpp index 849ff65..f7be6be 100644 --- a/boost/asio/deadline_timer.hpp +++ b/boost/asio/deadline_timer.hpp @@ -2,7 +2,7 @@ // deadline_timer.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/deadline_timer_service.hpp b/boost/asio/deadline_timer_service.hpp index 20ae802..26dcb42 100644 --- a/boost/asio/deadline_timer_service.hpp +++ b/boost/asio/deadline_timer_service.hpp @@ -2,7 +2,7 @@ // deadline_timer_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/addressof.hpp b/boost/asio/detail/addressof.hpp index 972c1f1..cc10997 100644 --- a/boost/asio/detail/addressof.hpp +++ b/boost/asio/detail/addressof.hpp @@ -2,7 +2,7 @@ // detail/addressof.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/array.hpp b/boost/asio/detail/array.hpp index 2165e60..29e5077 100644 --- a/boost/asio/detail/array.hpp +++ b/boost/asio/detail/array.hpp @@ -2,7 +2,7 @@ // detail/array.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/array_fwd.hpp b/boost/asio/detail/array_fwd.hpp index 6ba840a..aefe467 100644 --- a/boost/asio/detail/array_fwd.hpp +++ b/boost/asio/detail/array_fwd.hpp @@ -2,7 +2,7 @@ // detail/array_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/assert.hpp b/boost/asio/detail/assert.hpp index 1254b88..b522552 100644 --- a/boost/asio/detail/assert.hpp +++ b/boost/asio/detail/assert.hpp @@ -2,7 +2,7 @@ // detail/assert.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/atomic_count.hpp b/boost/asio/detail/atomic_count.hpp index 12e1ae9..416ed9d 100644 --- a/boost/asio/detail/atomic_count.hpp +++ b/boost/asio/detail/atomic_count.hpp @@ -2,7 +2,7 @@ // detail/atomic_count.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/base_from_completion_cond.hpp b/boost/asio/detail/base_from_completion_cond.hpp index b92c699..61315ca 100644 --- a/boost/asio/detail/base_from_completion_cond.hpp +++ b/boost/asio/detail/base_from_completion_cond.hpp @@ -2,7 +2,7 @@ // detail/base_from_completion_cond.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/bind_handler.hpp b/boost/asio/detail/bind_handler.hpp index e731804..0f3672e 100644 --- a/boost/asio/detail/bind_handler.hpp +++ b/boost/asio/detail/bind_handler.hpp @@ -2,7 +2,7 @@ // detail/bind_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/buffer_resize_guard.hpp b/boost/asio/detail/buffer_resize_guard.hpp index 88b9315..849defb 100644 --- a/boost/asio/detail/buffer_resize_guard.hpp +++ b/boost/asio/detail/buffer_resize_guard.hpp @@ -2,7 +2,7 @@ // detail/buffer_resize_guard.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/buffer_sequence_adapter.hpp b/boost/asio/detail/buffer_sequence_adapter.hpp index fdca995..20c529e 100644 --- a/boost/asio/detail/buffer_sequence_adapter.hpp +++ b/boost/asio/detail/buffer_sequence_adapter.hpp @@ -2,7 +2,7 @@ // detail/buffer_sequence_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/buffered_stream_storage.hpp b/boost/asio/detail/buffered_stream_storage.hpp index 862c352..0ac5749 100644 --- a/boost/asio/detail/buffered_stream_storage.hpp +++ b/boost/asio/detail/buffered_stream_storage.hpp @@ -2,7 +2,7 @@ // detail/buffered_stream_storage.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/call_stack.hpp b/boost/asio/detail/call_stack.hpp index 148b19c..5253e3b 100644 --- a/boost/asio/detail/call_stack.hpp +++ b/boost/asio/detail/call_stack.hpp @@ -2,7 +2,7 @@ // detail/call_stack.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/chrono_time_traits.hpp b/boost/asio/detail/chrono_time_traits.hpp index f6bfed6..421163a 100644 --- a/boost/asio/detail/chrono_time_traits.hpp +++ b/boost/asio/detail/chrono_time_traits.hpp @@ -2,7 +2,7 @@ // detail/chrono_time_traits.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/completion_handler.hpp b/boost/asio/detail/completion_handler.hpp index 3cfb166..6333dce 100644 --- a/boost/asio/detail/completion_handler.hpp +++ b/boost/asio/detail/completion_handler.hpp @@ -2,7 +2,7 @@ // detail/completion_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/config.hpp b/boost/asio/detail/config.hpp index 319f94f..baeb86d 100644 --- a/boost/asio/detail/config.hpp +++ b/boost/asio/detail/config.hpp @@ -2,7 +2,7 @@ // detail/config.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -435,6 +435,30 @@ # endif // !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS) #endif // !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) +// Standard library support for the C++11 allocator additions. +#if !defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS) +# if !defined(BOOST_ASIO_DISABLE_CXX11_ALLOCATORS) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1 +# elif (__cplusplus >= 201103) +# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1 +# endif // (__cplusplus >= 201103) +# elif defined(__GNUC__) +# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) +# if defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1 +# endif // defined(__GXX_EXPERIMENTAL_CXX0X__) +# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) +# endif // defined(__GNUC__) +# if defined(BOOST_ASIO_MSVC) +# if (_MSC_VER >= 1700) +# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1 +# endif // (_MSC_VER >= 1700) +# endif // defined(BOOST_ASIO_MSVC) +# endif // !defined(BOOST_ASIO_DISABLE_CXX11_ALLOCATORS) +#endif // !defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS) + // Standard library support for the cstdint header. #if !defined(BOOST_ASIO_HAS_CSTDINT) # if !defined(BOOST_ASIO_DISABLE_CSTDINT) @@ -993,4 +1017,34 @@ // || (defined(__MACH__) && defined(__APPLE__)) #endif // !defined(BOOST_ASIO_DISABLE_SSIZE_T) +// Newer gcc, clang need special treatment to suppress unused typedef warnings. +#if defined(__clang__) +# if defined(__apple_build_version__) +# if (__clang_major__ >= 7) +# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) +# endif // (__clang_major__ >= 7) +# elif ((__clang_major__ == 3) && (__clang_minor__ >= 6)) \ + || (__clang_major__ > 3) +# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) +# endif // ((__clang_major__ == 3) && (__clang_minor__ >= 6)) + // || (__clang_major__ > 3) +#elif defined(__GNUC__) +# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) +# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) +# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) +#endif // defined(__GNUC__) +#if !defined(BOOST_ASIO_UNUSED_TYPEDEF) +# define BOOST_ASIO_UNUSED_TYPEDEF +#endif // !defined(BOOST_ASIO_UNUSED_TYPEDEF) + +// Some versions of gcc generate spurious warnings about unused variables. +#if defined(__GNUC__) +# if (__GNUC__ >= 4) +# define BOOST_ASIO_UNUSED_VARIABLE __attribute__((__unused__)) +# endif // (__GNUC__ >= 4) +#endif // defined(__GNUC__) +#if !defined(BOOST_ASIO_UNUSED_VARIABLE) +# define BOOST_ASIO_UNUSED_VARIABLE +#endif // !defined(BOOST_ASIO_UNUSED_VARIABLE) + #endif // BOOST_ASIO_DETAIL_CONFIG_HPP diff --git a/boost/asio/detail/consuming_buffers.hpp b/boost/asio/detail/consuming_buffers.hpp index 8d7fc16..f0978b5 100644 --- a/boost/asio/detail/consuming_buffers.hpp +++ b/boost/asio/detail/consuming_buffers.hpp @@ -2,7 +2,7 @@ // detail/consuming_buffers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/cstdint.hpp b/boost/asio/detail/cstdint.hpp index 262d3a9..a1be0dc 100644 --- a/boost/asio/detail/cstdint.hpp +++ b/boost/asio/detail/cstdint.hpp @@ -2,7 +2,7 @@ // detail/cstdint.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/date_time_fwd.hpp b/boost/asio/detail/date_time_fwd.hpp index c875683..33191bf 100644 --- a/boost/asio/detail/date_time_fwd.hpp +++ b/boost/asio/detail/date_time_fwd.hpp @@ -2,7 +2,7 @@ // detail/date_time_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/deadline_timer_service.hpp b/boost/asio/detail/deadline_timer_service.hpp index df22ec4..bbd5358 100644 --- a/boost/asio/detail/deadline_timer_service.hpp +++ b/boost/asio/detail/deadline_timer_service.hpp @@ -2,7 +2,7 @@ // detail/deadline_timer_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/dependent_type.hpp b/boost/asio/detail/dependent_type.hpp index 1a03a82..138d0cc 100644 --- a/boost/asio/detail/dependent_type.hpp +++ b/boost/asio/detail/dependent_type.hpp @@ -2,7 +2,7 @@ // detail/dependent_type.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/descriptor_ops.hpp b/boost/asio/detail/descriptor_ops.hpp index d5a6319..6210039 100644 --- a/boost/asio/detail/descriptor_ops.hpp +++ b/boost/asio/detail/descriptor_ops.hpp @@ -2,7 +2,7 @@ // detail/descriptor_ops.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/descriptor_read_op.hpp b/boost/asio/detail/descriptor_read_op.hpp index 2fc643d..ddbdf7d 100644 --- a/boost/asio/detail/descriptor_read_op.hpp +++ b/boost/asio/detail/descriptor_read_op.hpp @@ -2,7 +2,7 @@ // detail/descriptor_read_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/descriptor_write_op.hpp b/boost/asio/detail/descriptor_write_op.hpp index 6ca79a6..f635feb 100644 --- a/boost/asio/detail/descriptor_write_op.hpp +++ b/boost/asio/detail/descriptor_write_op.hpp @@ -2,7 +2,7 @@ // detail/descriptor_write_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/dev_poll_reactor.hpp b/boost/asio/detail/dev_poll_reactor.hpp index e18a44a..db6f3d1 100644 --- a/boost/asio/detail/dev_poll_reactor.hpp +++ b/boost/asio/detail/dev_poll_reactor.hpp @@ -2,7 +2,7 @@ // detail/dev_poll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/epoll_reactor.hpp b/boost/asio/detail/epoll_reactor.hpp index fe82481..64c5b27 100644 --- a/boost/asio/detail/epoll_reactor.hpp +++ b/boost/asio/detail/epoll_reactor.hpp @@ -2,7 +2,7 @@ // detail/epoll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/event.hpp b/boost/asio/detail/event.hpp index a6616b1..45367bb 100644 --- a/boost/asio/detail/event.hpp +++ b/boost/asio/detail/event.hpp @@ -2,7 +2,7 @@ // detail/event.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/eventfd_select_interrupter.hpp b/boost/asio/detail/eventfd_select_interrupter.hpp index 0b1fcab..c5b0b39 100644 --- a/boost/asio/detail/eventfd_select_interrupter.hpp +++ b/boost/asio/detail/eventfd_select_interrupter.hpp @@ -2,7 +2,7 @@ // detail/eventfd_select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/fd_set_adapter.hpp b/boost/asio/detail/fd_set_adapter.hpp index 38464dc..6916db5 100644 --- a/boost/asio/detail/fd_set_adapter.hpp +++ b/boost/asio/detail/fd_set_adapter.hpp @@ -2,7 +2,7 @@ // detail/fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/fenced_block.hpp b/boost/asio/detail/fenced_block.hpp index ad86672..628ca75 100644 --- a/boost/asio/detail/fenced_block.hpp +++ b/boost/asio/detail/fenced_block.hpp @@ -2,7 +2,7 @@ // detail/fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -20,6 +20,8 @@ #if !defined(BOOST_ASIO_HAS_THREADS) \ || defined(BOOST_ASIO_DISABLE_FENCED_BLOCK) # include <boost/asio/detail/null_fenced_block.hpp> +#elif defined(BOOST_ASIO_HAS_STD_ATOMIC) +# include <boost/asio/detail/std_fenced_block.hpp> #elif defined(__MACH__) && defined(__APPLE__) # include <boost/asio/detail/macos_fenced_block.hpp> #elif defined(__sun) @@ -49,6 +51,8 @@ namespace detail { #if !defined(BOOST_ASIO_HAS_THREADS) \ || defined(BOOST_ASIO_DISABLE_FENCED_BLOCK) typedef null_fenced_block fenced_block; +#elif defined(BOOST_ASIO_HAS_STD_ATOMIC) +typedef std_fenced_block fenced_block; #elif defined(__MACH__) && defined(__APPLE__) typedef macos_fenced_block fenced_block; #elif defined(__sun) diff --git a/boost/asio/detail/function.hpp b/boost/asio/detail/function.hpp index 475efcb..db26144 100644 --- a/boost/asio/detail/function.hpp +++ b/boost/asio/detail/function.hpp @@ -2,7 +2,7 @@ // detail/function.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/gcc_arm_fenced_block.hpp b/boost/asio/detail/gcc_arm_fenced_block.hpp index 2f6cae4..b4805c3 100644 --- a/boost/asio/detail/gcc_arm_fenced_block.hpp +++ b/boost/asio/detail/gcc_arm_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_arm_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/gcc_hppa_fenced_block.hpp b/boost/asio/detail/gcc_hppa_fenced_block.hpp index b31e48b..b9aa9e2 100644 --- a/boost/asio/detail/gcc_hppa_fenced_block.hpp +++ b/boost/asio/detail/gcc_hppa_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_hppa_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/gcc_sync_fenced_block.hpp b/boost/asio/detail/gcc_sync_fenced_block.hpp index 9db9f64..e8e6c54 100644 --- a/boost/asio/detail/gcc_sync_fenced_block.hpp +++ b/boost/asio/detail/gcc_sync_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_sync_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/gcc_x86_fenced_block.hpp b/boost/asio/detail/gcc_x86_fenced_block.hpp index 07354f6..fe0ce8a 100644 --- a/boost/asio/detail/gcc_x86_fenced_block.hpp +++ b/boost/asio/detail/gcc_x86_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_x86_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/handler_alloc_helpers.hpp b/boost/asio/detail/handler_alloc_helpers.hpp index 16b7e26..a03cb41 100644 --- a/boost/asio/detail/handler_alloc_helpers.hpp +++ b/boost/asio/detail/handler_alloc_helpers.hpp @@ -2,7 +2,7 @@ // detail/handler_alloc_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/handler_cont_helpers.hpp b/boost/asio/detail/handler_cont_helpers.hpp index 90ae8a0..9a361a9 100644 --- a/boost/asio/detail/handler_cont_helpers.hpp +++ b/boost/asio/detail/handler_cont_helpers.hpp @@ -2,7 +2,7 @@ // detail/handler_cont_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/handler_invoke_helpers.hpp b/boost/asio/detail/handler_invoke_helpers.hpp index f5447ab..43f74f3 100644 --- a/boost/asio/detail/handler_invoke_helpers.hpp +++ b/boost/asio/detail/handler_invoke_helpers.hpp @@ -2,7 +2,7 @@ // detail/handler_invoke_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/handler_tracking.hpp b/boost/asio/detail/handler_tracking.hpp index 5f935f8..fd69bdd 100644 --- a/boost/asio/detail/handler_tracking.hpp +++ b/boost/asio/detail/handler_tracking.hpp @@ -2,7 +2,7 @@ // detail/handler_tracking.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/handler_type_requirements.hpp b/boost/asio/detail/handler_type_requirements.hpp index eb1908a..bc2fbce 100644 --- a/boost/asio/detail/handler_type_requirements.hpp +++ b/boost/asio/detail/handler_type_requirements.hpp @@ -2,7 +2,7 @@ // detail/handler_type_requirements.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -53,26 +53,6 @@ # include <boost/asio/handler_type.hpp> #endif // defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS) -// Newer gcc, clang need special treatment to suppress unused typedef warnings. -#if defined(__clang__) -# if defined(__apple_build_version__) -# if (__clang_major__ >= 7) -# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) -# endif // (__clang_major__ >= 7) -# elif ((__clang_major__ == 3) && (__clang_minor__ >= 6)) \ - || (__clang_major__ > 3) -# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) -# endif // ((__clang_major__ == 3) && (__clang_minor__ >= 6)) - // || (__clang_major__ > 3) -#elif defined(__GNUC__) -# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) -# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) -# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) -#endif // defined(__GNUC__) -#if !defined(BOOST_ASIO_UNUSED_TYPEDEF) -# define BOOST_ASIO_UNUSED_TYPEDEF -#endif // !defined(BOOST_ASIO_UNUSED_TYPEDEF) - namespace boost { namespace asio { namespace detail { diff --git a/boost/asio/detail/hash_map.hpp b/boost/asio/detail/hash_map.hpp index da59857..0c3b53b 100644 --- a/boost/asio/detail/hash_map.hpp +++ b/boost/asio/detail/hash_map.hpp @@ -2,7 +2,7 @@ // detail/hash_map.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -244,15 +244,15 @@ private: { if (num_buckets == num_buckets_) return; - num_buckets_ = num_buckets; - BOOST_ASIO_ASSERT(num_buckets_ != 0); + BOOST_ASIO_ASSERT(num_buckets != 0); iterator end_iter = values_.end(); // Update number of buckets and initialise all buckets to empty. - bucket_type* tmp = new bucket_type[num_buckets_]; + bucket_type* tmp = new bucket_type[num_buckets]; delete[] buckets_; buckets_ = tmp; + num_buckets_ = num_buckets; for (std::size_t i = 0; i < num_buckets_; ++i) buckets_[i].first = buckets_[i].last = end_iter; diff --git a/boost/asio/detail/impl/buffer_sequence_adapter.ipp b/boost/asio/detail/impl/buffer_sequence_adapter.ipp index b532582..f471863 100644 --- a/boost/asio/detail/impl/buffer_sequence_adapter.ipp +++ b/boost/asio/detail/impl/buffer_sequence_adapter.ipp @@ -2,7 +2,7 @@ // detail/impl/buffer_sequence_adapter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/descriptor_ops.ipp b/boost/asio/detail/impl/descriptor_ops.ipp index 0984b4b..00f6b47 100644 --- a/boost/asio/detail/impl/descriptor_ops.ipp +++ b/boost/asio/detail/impl/descriptor_ops.ipp @@ -2,7 +2,7 @@ // detail/impl/descriptor_ops.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/dev_poll_reactor.hpp b/boost/asio/detail/impl/dev_poll_reactor.hpp index 3e19406..623346e 100644 --- a/boost/asio/detail/impl/dev_poll_reactor.hpp +++ b/boost/asio/detail/impl/dev_poll_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/dev_poll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/dev_poll_reactor.ipp b/boost/asio/detail/impl/dev_poll_reactor.ipp index 521dc0b..efe2ba7 100644 --- a/boost/asio/detail/impl/dev_poll_reactor.ipp +++ b/boost/asio/detail/impl/dev_poll_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/dev_poll_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/epoll_reactor.hpp b/boost/asio/detail/impl/epoll_reactor.hpp index c579da5..ea5c6bf 100644 --- a/boost/asio/detail/impl/epoll_reactor.hpp +++ b/boost/asio/detail/impl/epoll_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/epoll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/epoll_reactor.ipp b/boost/asio/detail/impl/epoll_reactor.ipp index 25eb005..610ce31 100644 --- a/boost/asio/detail/impl/epoll_reactor.ipp +++ b/boost/asio/detail/impl/epoll_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/epoll_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -164,7 +164,18 @@ int epoll_reactor::register_descriptor(socket_type descriptor, ev.data.ptr = descriptor_data; int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, descriptor, &ev); if (result != 0) + { + if (errno == EPERM) + { + // This file descriptor type is not supported by epoll. However, if it is + // a regular file then operations on it will not block. We will allow + // this descriptor to be used and fail later if an operation on it would + // otherwise require a trip through the reactor. + descriptor_data->registered_events_ = 0; + return 0; + } return errno; + } return 0; } @@ -235,6 +246,13 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor, return; } + if (descriptor_data->registered_events_ == 0) + { + op->ec_ = boost::asio::error::operation_not_supported; + io_service_.post_immediate_completion(op, is_continuation); + return; + } + if (op_type == write_op) { if ((descriptor_data->registered_events_ & EPOLLOUT) == 0) @@ -256,6 +274,12 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor, } } } + else if (descriptor_data->registered_events_ == 0) + { + op->ec_ = boost::asio::error::operation_not_supported; + io_service_.post_immediate_completion(op, is_continuation); + return; + } else { if (op_type == write_op) @@ -313,7 +337,7 @@ void epoll_reactor::deregister_descriptor(socket_type descriptor, // The descriptor will be automatically removed from the epoll set when // it is closed. } - else + else if (descriptor_data->registered_events_ != 0) { epoll_event ev = { 0, { 0 } }; epoll_ctl(epoll_fd_, EPOLL_CTL_DEL, descriptor, &ev); diff --git a/boost/asio/detail/impl/eventfd_select_interrupter.ipp b/boost/asio/detail/impl/eventfd_select_interrupter.ipp index e245014..2ce1f6d 100644 --- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp +++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp @@ -2,7 +2,7 @@ // detail/impl/eventfd_select_interrupter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/handler_tracking.ipp b/boost/asio/detail/impl/handler_tracking.ipp index 88cd1e9..259b5ab 100644 --- a/boost/asio/detail/impl/handler_tracking.ipp +++ b/boost/asio/detail/impl/handler_tracking.ipp @@ -2,7 +2,7 @@ // detail/impl/handler_tracking.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/kqueue_reactor.hpp b/boost/asio/detail/impl/kqueue_reactor.hpp index 3025d55..93cbca2 100644 --- a/boost/asio/detail/impl/kqueue_reactor.hpp +++ b/boost/asio/detail/impl/kqueue_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/kqueue_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/kqueue_reactor.ipp b/boost/asio/detail/impl/kqueue_reactor.ipp index 8aecd9b..b4a7a10 100644 --- a/boost/asio/detail/impl/kqueue_reactor.ipp +++ b/boost/asio/detail/impl/kqueue_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/kqueue_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/pipe_select_interrupter.ipp b/boost/asio/detail/impl/pipe_select_interrupter.ipp index 65eb233..4f8923f 100644 --- a/boost/asio/detail/impl/pipe_select_interrupter.ipp +++ b/boost/asio/detail/impl/pipe_select_interrupter.ipp @@ -2,7 +2,7 @@ // detail/impl/pipe_select_interrupter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/posix_event.ipp b/boost/asio/detail/impl/posix_event.ipp index 62368c1..3b465ca 100644 --- a/boost/asio/detail/impl/posix_event.ipp +++ b/boost/asio/detail/impl/posix_event.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_event.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/posix_mutex.ipp b/boost/asio/detail/impl/posix_mutex.ipp index bb96260..7153023 100644 --- a/boost/asio/detail/impl/posix_mutex.ipp +++ b/boost/asio/detail/impl/posix_mutex.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_mutex.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/posix_thread.ipp b/boost/asio/detail/impl/posix_thread.ipp index c85c2ec..66cb18d 100644 --- a/boost/asio/detail/impl/posix_thread.ipp +++ b/boost/asio/detail/impl/posix_thread.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_thread.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/posix_tss_ptr.ipp b/boost/asio/detail/impl/posix_tss_ptr.ipp index 1436003..21b522c 100644 --- a/boost/asio/detail/impl/posix_tss_ptr.ipp +++ b/boost/asio/detail/impl/posix_tss_ptr.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_tss_ptr.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/reactive_descriptor_service.ipp b/boost/asio/detail/impl/reactive_descriptor_service.ipp index c7ad818..56caec9 100644 --- a/boost/asio/detail/impl/reactive_descriptor_service.ipp +++ b/boost/asio/detail/impl/reactive_descriptor_service.ipp @@ -2,7 +2,7 @@ // detail/impl/reactive_descriptor_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/reactive_serial_port_service.ipp b/boost/asio/detail/impl/reactive_serial_port_service.ipp index 6417284..ffa8857 100644 --- a/boost/asio/detail/impl/reactive_serial_port_service.ipp +++ b/boost/asio/detail/impl/reactive_serial_port_service.ipp @@ -2,7 +2,7 @@ // detail/impl/reactive_serial_port_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/reactive_socket_service_base.ipp b/boost/asio/detail/impl/reactive_socket_service_base.ipp index b15d085..21e77e9 100644 --- a/boost/asio/detail/impl/reactive_socket_service_base.ipp +++ b/boost/asio/detail/impl/reactive_socket_service_base.ipp @@ -2,7 +2,7 @@ // detail/reactive_socket_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/resolver_service_base.ipp b/boost/asio/detail/impl/resolver_service_base.ipp index 3f4a410..4ef66cd 100644 --- a/boost/asio/detail/impl/resolver_service_base.ipp +++ b/boost/asio/detail/impl/resolver_service_base.ipp @@ -2,7 +2,7 @@ // detail/impl/resolver_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/select_reactor.hpp b/boost/asio/detail/impl/select_reactor.hpp index 2c89c64..d3f28f5 100644 --- a/boost/asio/detail/impl/select_reactor.hpp +++ b/boost/asio/detail/impl/select_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/select_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/select_reactor.ipp b/boost/asio/detail/impl/select_reactor.ipp index df81051..80686ea 100644 --- a/boost/asio/detail/impl/select_reactor.ipp +++ b/boost/asio/detail/impl/select_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/select_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/service_registry.hpp b/boost/asio/detail/impl/service_registry.hpp index 89ecd24..7ffdd02 100644 --- a/boost/asio/detail/impl/service_registry.hpp +++ b/boost/asio/detail/impl/service_registry.hpp @@ -2,7 +2,7 @@ // detail/impl/service_registry.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/service_registry.ipp b/boost/asio/detail/impl/service_registry.ipp index 1023d28..25ac8ec 100644 --- a/boost/asio/detail/impl/service_registry.ipp +++ b/boost/asio/detail/impl/service_registry.ipp @@ -2,7 +2,7 @@ // detail/impl/service_registry.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/signal_set_service.ipp b/boost/asio/detail/impl/signal_set_service.ipp index d05fa4c..56313e0 100644 --- a/boost/asio/detail/impl/signal_set_service.ipp +++ b/boost/asio/detail/impl/signal_set_service.ipp @@ -2,7 +2,7 @@ // detail/impl/signal_set_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/socket_ops.ipp b/boost/asio/detail/impl/socket_ops.ipp index 1017aaf..c9683f4 100644 --- a/boost/asio/detail/impl/socket_ops.ipp +++ b/boost/asio/detail/impl/socket_ops.ipp @@ -2,7 +2,7 @@ // detail/impl/socket_ops.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -3238,6 +3238,37 @@ boost::system::error_code getaddrinfo(const char* host, return ec = translate_addrinfo_error(error); #else int error = ::getaddrinfo(host, service, &hints, result); +#if defined(__MACH__) && defined(__APPLE__) + using namespace std; // For isdigit and atoi. + if (error == 0 && service && isdigit(static_cast<unsigned char>(service[0]))) + { + u_short_type port = host_to_network_short(atoi(service)); + for (addrinfo_type* ai = *result; ai; ai = ai->ai_next) + { + switch (ai->ai_family) + { + case BOOST_ASIO_OS_DEF(AF_INET): + { + sockaddr_in4_type* sinptr = + reinterpret_cast<sockaddr_in4_type*>(ai->ai_addr); + if (sinptr->sin_port == 0) + sinptr->sin_port = port; + break; + } + case BOOST_ASIO_OS_DEF(AF_INET6): + { + sockaddr_in6_type* sin6ptr = + reinterpret_cast<sockaddr_in6_type*>(ai->ai_addr); + if (sin6ptr->sin6_port == 0) + sin6ptr->sin6_port = port; + break; + } + default: + break; + } + } + } +#endif return ec = translate_addrinfo_error(error); #endif } diff --git a/boost/asio/detail/impl/socket_select_interrupter.ipp b/boost/asio/detail/impl/socket_select_interrupter.ipp index 3ff6665..409996c 100644 --- a/boost/asio/detail/impl/socket_select_interrupter.ipp +++ b/boost/asio/detail/impl/socket_select_interrupter.ipp @@ -2,7 +2,7 @@ // detail/impl/socket_select_interrupter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/strand_service.hpp b/boost/asio/detail/impl/strand_service.hpp index 45189a3..4167f68 100644 --- a/boost/asio/detail/impl/strand_service.hpp +++ b/boost/asio/detail/impl/strand_service.hpp @@ -2,7 +2,7 @@ // detail/impl/strand_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/strand_service.ipp b/boost/asio/detail/impl/strand_service.ipp index 7545559..54ecde2 100644 --- a/boost/asio/detail/impl/strand_service.ipp +++ b/boost/asio/detail/impl/strand_service.ipp @@ -2,7 +2,7 @@ // detail/impl/strand_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/task_io_service.hpp b/boost/asio/detail/impl/task_io_service.hpp index 5a19a01..09b4ba6 100644 --- a/boost/asio/detail/impl/task_io_service.hpp +++ b/boost/asio/detail/impl/task_io_service.hpp @@ -2,7 +2,7 @@ // detail/impl/task_io_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/task_io_service.ipp b/boost/asio/detail/impl/task_io_service.ipp index 756e188..bc83fd4 100644 --- a/boost/asio/detail/impl/task_io_service.ipp +++ b/boost/asio/detail/impl/task_io_service.ipp @@ -2,7 +2,7 @@ // detail/impl/task_io_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/throw_error.ipp b/boost/asio/detail/impl/throw_error.ipp index e95e071..a1c3149 100644 --- a/boost/asio/detail/impl/throw_error.ipp +++ b/boost/asio/detail/impl/throw_error.ipp @@ -2,7 +2,7 @@ // detail/impl/throw_error.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/timer_queue_ptime.ipp b/boost/asio/detail/impl/timer_queue_ptime.ipp index f665a51..0216d20 100644 --- a/boost/asio/detail/impl/timer_queue_ptime.ipp +++ b/boost/asio/detail/impl/timer_queue_ptime.ipp @@ -2,7 +2,7 @@ // detail/impl/timer_queue_ptime.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/timer_queue_set.ipp b/boost/asio/detail/impl/timer_queue_set.ipp index 81f7b62..25c845c 100644 --- a/boost/asio/detail/impl/timer_queue_set.ipp +++ b/boost/asio/detail/impl/timer_queue_set.ipp @@ -2,7 +2,7 @@ // detail/impl/timer_queue_set.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_event.ipp b/boost/asio/detail/impl/win_event.ipp index 1280f00..2519d31 100644 --- a/boost/asio/detail/impl/win_event.ipp +++ b/boost/asio/detail/impl/win_event.ipp @@ -2,7 +2,7 @@ // detail/win_event.ipp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_iocp_handle_service.ipp b/boost/asio/detail/impl/win_iocp_handle_service.ipp index 0960443..ea513bc 100644 --- a/boost/asio/detail/impl/win_iocp_handle_service.ipp +++ b/boost/asio/detail/impl/win_iocp_handle_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_handle_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/win_iocp_io_service.hpp b/boost/asio/detail/impl/win_iocp_io_service.hpp index 9234488..e3505cb 100644 --- a/boost/asio/detail/impl/win_iocp_io_service.hpp +++ b/boost/asio/detail/impl/win_iocp_io_service.hpp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_io_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_iocp_io_service.ipp b/boost/asio/detail/impl/win_iocp_io_service.ipp index c26c372..a5bfcbb 100644 --- a/boost/asio/detail/impl/win_iocp_io_service.ipp +++ b/boost/asio/detail/impl/win_iocp_io_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_io_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_iocp_serial_port_service.ipp b/boost/asio/detail/impl/win_iocp_serial_port_service.ipp index 1c48465..32ba346 100644 --- a/boost/asio/detail/impl/win_iocp_serial_port_service.ipp +++ b/boost/asio/detail/impl/win_iocp_serial_port_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_serial_port_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/win_iocp_socket_service_base.ipp b/boost/asio/detail/impl/win_iocp_socket_service_base.ipp index 36fff85..22818f7 100644 --- a/boost/asio/detail/impl/win_iocp_socket_service_base.ipp +++ b/boost/asio/detail/impl/win_iocp_socket_service_base.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_socket_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_mutex.ipp b/boost/asio/detail/impl/win_mutex.ipp index 6946fd1..c4be08c 100644 --- a/boost/asio/detail/impl/win_mutex.ipp +++ b/boost/asio/detail/impl/win_mutex.ipp @@ -2,7 +2,7 @@ // detail/impl/win_mutex.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -45,7 +45,8 @@ int win_mutex::do_init() # if defined(UNDER_CE) ::InitializeCriticalSection(&crit_section_); # elif defined(BOOST_ASIO_WINDOWS_APP) - ::InitializeCriticalSectionEx(&crit_section_, 0x80000000, 0); + if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0)) + return ::GetLastError(); # else if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000)) return ::GetLastError(); @@ -58,7 +59,7 @@ int win_mutex::do_init() ::InitializeCriticalSection(&crit_section_); # elif defined(BOOST_ASIO_WINDOWS_APP) if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0)) - return ::GetLastError(); + return ::GetLastError(); # else if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000)) return ::GetLastError(); diff --git a/boost/asio/detail/impl/win_object_handle_service.ipp b/boost/asio/detail/impl/win_object_handle_service.ipp index 16f7992..a940161 100644 --- a/boost/asio/detail/impl/win_object_handle_service.ipp +++ b/boost/asio/detail/impl/win_object_handle_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_object_handle_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2011 Boris Schaeling (boris@highscore.de) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/win_static_mutex.ipp b/boost/asio/detail/impl/win_static_mutex.ipp index 18bb679..9b29da0 100644 --- a/boost/asio/detail/impl/win_static_mutex.ipp +++ b/boost/asio/detail/impl/win_static_mutex.ipp @@ -2,7 +2,7 @@ // detail/impl/win_static_mutex.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_thread.ipp b/boost/asio/detail/impl/win_thread.ipp index 95689df..e2d9384 100644 --- a/boost/asio/detail/impl/win_thread.ipp +++ b/boost/asio/detail/impl/win_thread.ipp @@ -2,7 +2,7 @@ // detail/impl/win_thread.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_tss_ptr.ipp b/boost/asio/detail/impl/win_tss_ptr.ipp index 0f4312c..3390066 100644 --- a/boost/asio/detail/impl/win_tss_ptr.ipp +++ b/boost/asio/detail/impl/win_tss_ptr.ipp @@ -2,7 +2,7 @@ // detail/impl/win_tss_ptr.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/winrt_ssocket_service_base.ipp b/boost/asio/detail/impl/winrt_ssocket_service_base.ipp index e1ba90e..f5990a9 100644 --- a/boost/asio/detail/impl/winrt_ssocket_service_base.ipp +++ b/boost/asio/detail/impl/winrt_ssocket_service_base.ipp @@ -2,7 +2,7 @@ // detail/impl/winrt_ssocket_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/winrt_timer_scheduler.hpp b/boost/asio/detail/impl/winrt_timer_scheduler.hpp index bcc7173..8d93e57 100644 --- a/boost/asio/detail/impl/winrt_timer_scheduler.hpp +++ b/boost/asio/detail/impl/winrt_timer_scheduler.hpp @@ -2,7 +2,7 @@ // detail/impl/winrt_timer_scheduler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/winrt_timer_scheduler.ipp b/boost/asio/detail/impl/winrt_timer_scheduler.ipp index 07d24ef..914849d 100644 --- a/boost/asio/detail/impl/winrt_timer_scheduler.ipp +++ b/boost/asio/detail/impl/winrt_timer_scheduler.ipp @@ -2,7 +2,7 @@ // detail/impl/winrt_timer_scheduler.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/winsock_init.ipp b/boost/asio/detail/impl/winsock_init.ipp index 4ad2041..57ef612 100644 --- a/boost/asio/detail/impl/winsock_init.ipp +++ b/boost/asio/detail/impl/winsock_init.ipp @@ -2,7 +2,7 @@ // detail/impl/winsock_init.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/io_control.hpp b/boost/asio/detail/io_control.hpp index 9c4a54b..6c7527d 100644 --- a/boost/asio/detail/io_control.hpp +++ b/boost/asio/detail/io_control.hpp @@ -2,7 +2,7 @@ // detail/io_control.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/keyword_tss_ptr.hpp b/boost/asio/detail/keyword_tss_ptr.hpp index 26cb12c..8a93ade 100644 --- a/boost/asio/detail/keyword_tss_ptr.hpp +++ b/boost/asio/detail/keyword_tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/keyword_tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/kqueue_reactor.hpp b/boost/asio/detail/kqueue_reactor.hpp index 8ed8f78..6aba2b2 100644 --- a/boost/asio/detail/kqueue_reactor.hpp +++ b/boost/asio/detail/kqueue_reactor.hpp @@ -2,7 +2,7 @@ // detail/kqueue_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/local_free_on_block_exit.hpp b/boost/asio/detail/local_free_on_block_exit.hpp index e3a59bb..a512216 100644 --- a/boost/asio/detail/local_free_on_block_exit.hpp +++ b/boost/asio/detail/local_free_on_block_exit.hpp @@ -2,7 +2,7 @@ // detail/local_free_on_block_exit.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/macos_fenced_block.hpp b/boost/asio/detail/macos_fenced_block.hpp index 4a98543..5ab7f91 100644 --- a/boost/asio/detail/macos_fenced_block.hpp +++ b/boost/asio/detail/macos_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/macos_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/memory.hpp b/boost/asio/detail/memory.hpp new file mode 100644 index 0000000..479b57a --- /dev/null +++ b/boost/asio/detail/memory.hpp @@ -0,0 +1,31 @@ +// +// detail/memory.hpp +// ~~~~~~~~~~~~~~~~~ +// +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// 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_ASIO_DETAIL_MEMORY_HPP +#define BOOST_ASIO_DETAIL_MEMORY_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include <boost/asio/detail/config.hpp> +#include <memory> + +#if defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS) +# define BOOST_ASIO_REBIND_ALLOC(alloc, t) \ + typename std::allocator_traits<alloc>::template rebind_alloc<t> + /**/ +#else // defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS) +# define BOOST_ASIO_REBIND_ALLOC(alloc, t) \ + typename alloc::template rebind<t>::other + /**/ +#endif // defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS) + +#endif // BOOST_ASIO_DETAIL_MEMORY_HPP diff --git a/boost/asio/detail/mutex.hpp b/boost/asio/detail/mutex.hpp index 81bada1..7c6917d 100644 --- a/boost/asio/detail/mutex.hpp +++ b/boost/asio/detail/mutex.hpp @@ -2,7 +2,7 @@ // detail/mutex.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/noncopyable.hpp b/boost/asio/detail/noncopyable.hpp index fd35836..5f946c3 100644 --- a/boost/asio/detail/noncopyable.hpp +++ b/boost/asio/detail/noncopyable.hpp @@ -2,7 +2,7 @@ // detail/noncopyable.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_event.hpp b/boost/asio/detail/null_event.hpp index 62a8656..28ba5ed 100644 --- a/boost/asio/detail/null_event.hpp +++ b/boost/asio/detail/null_event.hpp @@ -2,7 +2,7 @@ // detail/null_event.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_fenced_block.hpp b/boost/asio/detail/null_fenced_block.hpp index 237874f..27029b9 100644 --- a/boost/asio/detail/null_fenced_block.hpp +++ b/boost/asio/detail/null_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/null_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_mutex.hpp b/boost/asio/detail/null_mutex.hpp index 82a69d3..b3f032b 100644 --- a/boost/asio/detail/null_mutex.hpp +++ b/boost/asio/detail/null_mutex.hpp @@ -2,7 +2,7 @@ // detail/null_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_reactor.hpp b/boost/asio/detail/null_reactor.hpp index dee00d0..2cfce63 100644 --- a/boost/asio/detail/null_reactor.hpp +++ b/boost/asio/detail/null_reactor.hpp @@ -2,7 +2,7 @@ // detail/null_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_signal_blocker.hpp b/boost/asio/detail/null_signal_blocker.hpp index 8e73e78..4c00ec8 100644 --- a/boost/asio/detail/null_signal_blocker.hpp +++ b/boost/asio/detail/null_signal_blocker.hpp @@ -2,7 +2,7 @@ // detail/null_signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_socket_service.hpp b/boost/asio/detail/null_socket_service.hpp index 9dbccba..bf06ebb 100644 --- a/boost/asio/detail/null_socket_service.hpp +++ b/boost/asio/detail/null_socket_service.hpp @@ -2,7 +2,7 @@ // detail/null_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -79,6 +79,7 @@ public: // Move-construct a new socket implementation from another protocol type. template <typename Protocol1> void converting_move_construct(implementation_type&, + null_socket_service<Protocol1>&, typename null_socket_service<Protocol1>::implementation_type&) { } diff --git a/boost/asio/detail/null_static_mutex.hpp b/boost/asio/detail/null_static_mutex.hpp index 9945c6d..ba64471 100644 --- a/boost/asio/detail/null_static_mutex.hpp +++ b/boost/asio/detail/null_static_mutex.hpp @@ -2,7 +2,7 @@ // detail/null_static_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_thread.hpp b/boost/asio/detail/null_thread.hpp index 54e79a9..5e9b458 100644 --- a/boost/asio/detail/null_thread.hpp +++ b/boost/asio/detail/null_thread.hpp @@ -2,7 +2,7 @@ // detail/null_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_tss_ptr.hpp b/boost/asio/detail/null_tss_ptr.hpp index 70a3a1a..3030677 100644 --- a/boost/asio/detail/null_tss_ptr.hpp +++ b/boost/asio/detail/null_tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/null_tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/object_pool.hpp b/boost/asio/detail/object_pool.hpp index 9fd389d..692efed 100644 --- a/boost/asio/detail/object_pool.hpp +++ b/boost/asio/detail/object_pool.hpp @@ -2,7 +2,7 @@ // detail/object_pool.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/old_win_sdk_compat.hpp b/boost/asio/detail/old_win_sdk_compat.hpp index 85b98bb..403ff75 100644 --- a/boost/asio/detail/old_win_sdk_compat.hpp +++ b/boost/asio/detail/old_win_sdk_compat.hpp @@ -2,7 +2,7 @@ // detail/old_win_sdk_compat.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/op_queue.hpp b/boost/asio/detail/op_queue.hpp index 1320835..9605248 100644 --- a/boost/asio/detail/op_queue.hpp +++ b/boost/asio/detail/op_queue.hpp @@ -2,7 +2,7 @@ // detail/op_queue.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/operation.hpp b/boost/asio/detail/operation.hpp index 44f5a0f..a186a1f 100644 --- a/boost/asio/detail/operation.hpp +++ b/boost/asio/detail/operation.hpp @@ -2,7 +2,7 @@ // detail/operation.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyrigh |