diff options
author | 2019-06-17 22:18:29 +0000 | |
---|---|---|
committer | 2019-06-17 22:18:29 +0000 | |
commit | 504b10ec5101b237e4c07e1f2de4b6c48138181e (patch) | |
tree | 979c9ce8ab11efd05e4413305758dc5d6bc76ab4 /lib/libcxx/include/experimental | |
parent | A bit more KNF no binary change (diff) | |
download | wireguard-openbsd-504b10ec5101b237e4c07e1f2de4b6c48138181e.tar.xz wireguard-openbsd-504b10ec5101b237e4c07e1f2de4b6c48138181e.zip |
Import libc++ 8.0.0.
Diffstat (limited to 'lib/libcxx/include/experimental')
-rw-r--r-- | lib/libcxx/include/experimental/any | 18 | ||||
-rw-r--r-- | lib/libcxx/include/experimental/chrono | 18 | ||||
-rw-r--r-- | lib/libcxx/include/experimental/coroutine | 6 | ||||
-rw-r--r-- | lib/libcxx/include/experimental/memory_resource | 8 | ||||
-rw-r--r-- | lib/libcxx/include/experimental/numeric | 12 | ||||
-rw-r--r-- | lib/libcxx/include/experimental/optional | 12 | ||||
-rw-r--r-- | lib/libcxx/include/experimental/ratio | 18 | ||||
-rw-r--r-- | lib/libcxx/include/experimental/string_view | 16 | ||||
-rw-r--r-- | lib/libcxx/include/experimental/system_error | 12 | ||||
-rw-r--r-- | lib/libcxx/include/experimental/tuple | 12 |
10 files changed, 106 insertions, 26 deletions
diff --git a/lib/libcxx/include/experimental/any b/lib/libcxx/include/experimental/any index 1dcdd0f25ec..d9c95342589 100644 --- a/lib/libcxx/include/experimental/any +++ b/lib/libcxx/include/experimental/any @@ -1,11 +1,21 @@ // -*- C++ -*- -//===------------------------------ any -----------------------------------===// +//===------------------------------- any ----------------------------------===// // // The LLVM Compiler Infrastructure // -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_ANY +#define _LIBCPP_EXPERIMENTAL_ANY -#error "<experimental/any> has been removed. Use <any> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/any> has been removed. Use <any> instead.") +#else +# warning "<experimental/any> has been removed. Use <any> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_ANY diff --git a/lib/libcxx/include/experimental/chrono b/lib/libcxx/include/experimental/chrono index 591cf7160c1..30c7e4a9d5a 100644 --- a/lib/libcxx/include/experimental/chrono +++ b/lib/libcxx/include/experimental/chrono @@ -1,11 +1,21 @@ // -*- C++ -*- -//===------------------------------ chrono ---------------------------------===// +//===---------------------------- chrono ----------------------------------===// // // The LLVM Compiler Infrastructure // -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_CHRONO +#define _LIBCPP_EXPERIMENTAL_CHRONO -#error "<experimental/chrono> has been removed. Use <chrono> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/chrono> has been removed. Use <chrono> instead.") +#else +# warning "<experimental/chrono> has been removed. Use <chrono> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_CHRONO diff --git a/lib/libcxx/include/experimental/coroutine b/lib/libcxx/include/experimental/coroutine index 1eb224a535a..7cb39b81b48 100644 --- a/lib/libcxx/include/experimental/coroutine +++ b/lib/libcxx/include/experimental/coroutine @@ -214,7 +214,7 @@ public: _LIBCPP_INLINE_VISIBILITY _Promise& promise() const { return *static_cast<_Promise*>( - __builtin_coro_promise(this->__handle_, __alignof(_Promise), false)); + __builtin_coro_promise(this->__handle_, _LIBCPP_ALIGNOF(_Promise), false)); } public: @@ -254,7 +254,7 @@ public: coroutine_handle __tmp; __tmp.__handle_ = __builtin_coro_promise( _VSTD::addressof(const_cast<_RawPromise&>(__promise)), - __alignof(_Promise), true); + _LIBCPP_ALIGNOF(_Promise), true); return __tmp; } }; @@ -272,7 +272,7 @@ public: _LIBCPP_INLINE_VISIBILITY _Promise& promise() const { return *static_cast<_Promise*>( - __builtin_coro_promise(this->__handle_, __alignof(_Promise), false)); + __builtin_coro_promise(this->__handle_, _LIBCPP_ALIGNOF(_Promise), false)); } _LIBCPP_CONSTEXPR explicit operator bool() const _NOEXCEPT { return true; } diff --git a/lib/libcxx/include/experimental/memory_resource b/lib/libcxx/include/experimental/memory_resource index 221ce5b8eac..83781d46203 100644 --- a/lib/libcxx/include/experimental/memory_resource +++ b/lib/libcxx/include/experimental/memory_resource @@ -98,7 +98,7 @@ size_t __aligned_allocation_size(size_t __s, size_t __a) _NOEXCEPT // 8.5, memory.resource class _LIBCPP_TYPE_VIS memory_resource { - static const size_t __max_align = alignof(max_align_t); + static const size_t __max_align = _LIBCPP_ALIGNOF(max_align_t); // 8.5.2, memory.resource.public public: @@ -190,7 +190,7 @@ public: " 'n' exceeds maximum supported size"); } return static_cast<_ValueType*>( - __res_->allocate(__n * sizeof(_ValueType), alignof(_ValueType)) + __res_->allocate(__n * sizeof(_ValueType), _LIBCPP_ALIGNOF(_ValueType)) ); } @@ -198,7 +198,7 @@ public: void deallocate(_ValueType * __p, size_t __n) _NOEXCEPT { _LIBCPP_ASSERT(__n <= __max_size(), "deallocate called for size which exceeds max_size()"); - __res_->deallocate(__p, __n * sizeof(_ValueType), alignof(_ValueType)); + __res_->deallocate(__p, __n * sizeof(_ValueType), _LIBCPP_ALIGNOF(_ValueType)); } template <class _Tp, class ..._Ts> @@ -345,7 +345,7 @@ class _LIBCPP_TEMPLATE_VIS __resource_adaptor_imp && is_same<typename _CTraits::pointer, char*>::value && is_same<typename _CTraits::void_pointer, void*>::value, ""); - static const size_t _MaxAlign = alignof(max_align_t); + static const size_t _MaxAlign = _LIBCPP_ALIGNOF(max_align_t); using _Alloc = typename _CTraits::template rebind_alloc< typename aligned_storage<_MaxAlign, _MaxAlign>::type diff --git a/lib/libcxx/include/experimental/numeric b/lib/libcxx/include/experimental/numeric index 14a664011b5..19c65313f0f 100644 --- a/lib/libcxx/include/experimental/numeric +++ b/lib/libcxx/include/experimental/numeric @@ -7,5 +7,15 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_NUMERIC +#define _LIBCPP_EXPERIMENTAL_NUMERIC -#error "<experimental/numeric> has been removed. Use <numeric> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/numeric> has been removed. Use <numeric> instead.") +#else +# warning "<experimental/numeric> has been removed. Use <numeric> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_NUMERIC diff --git a/lib/libcxx/include/experimental/optional b/lib/libcxx/include/experimental/optional index d68cefdf6c1..6eb4a2618d2 100644 --- a/lib/libcxx/include/experimental/optional +++ b/lib/libcxx/include/experimental/optional @@ -7,5 +7,15 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_OPTIONAL +#define _LIBCPP_EXPERIMENTAL_OPTIONAL -#error "<experimental/optional> has been removed. Use <optional> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/optional> has been removed. Use <optional> instead.") +#else +# warning "<experimental/optional> has been removed. Use <optional> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_OPTIONAL diff --git a/lib/libcxx/include/experimental/ratio b/lib/libcxx/include/experimental/ratio index 9c2bf2e4624..52c12004dba 100644 --- a/lib/libcxx/include/experimental/ratio +++ b/lib/libcxx/include/experimental/ratio @@ -1,11 +1,21 @@ // -*- C++ -*- -//===------------------------------ ratio ---------------------------------===// +//===----------------------------- ratio ----------------------------------===// // // The LLVM Compiler Infrastructure // -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_RATIO +#define _LIBCPP_EXPERIMENTAL_RATIO -#error "<experimental/ratio> has been removed. Use <ratio> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/ratio> has been removed. Use <ratio> instead.") +#else +# warning "<experimental/ratio> has been removed. Use <ratio> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_RATIO diff --git a/lib/libcxx/include/experimental/string_view b/lib/libcxx/include/experimental/string_view index f13bff54d53..100bdfe7273 100644 --- a/lib/libcxx/include/experimental/string_view +++ b/lib/libcxx/include/experimental/string_view @@ -3,9 +3,19 @@ // // The LLVM Compiler Infrastructure // -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_STRING_VIEW +#define _LIBCPP_EXPERIMENTAL_STRING_VIEW -#error "<experimental/string_view> has been removed. Use <string_view> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/string_view> has been removed. Use <string_view> instead.") +#else +# warning "<experimental/string_view> has been removed. Use <string_view> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_STRING_VIEW diff --git a/lib/libcxx/include/experimental/system_error b/lib/libcxx/include/experimental/system_error index 7937357fa14..1cf84ee0125 100644 --- a/lib/libcxx/include/experimental/system_error +++ b/lib/libcxx/include/experimental/system_error @@ -7,5 +7,15 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR +#define _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR -#error "<experimental/system_error> has been removed. Use <system_error> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/system_error> has been removed. Use <system_error> instead.") +#else +# warning "<experimental/system_error> has been removed. Use <system_error> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR diff --git a/lib/libcxx/include/experimental/tuple b/lib/libcxx/include/experimental/tuple index 1f37a6293ba..6d71bb559b0 100644 --- a/lib/libcxx/include/experimental/tuple +++ b/lib/libcxx/include/experimental/tuple @@ -7,5 +7,15 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#ifndef _LIBCPP_EXPERIMENTAL_TUPLE +#define _LIBCPP_EXPERIMENTAL_TUPLE -#error "<experimental/tuple> has been removed. Use <tuple> instead." +#include <__config> + +#ifdef _LIBCPP_WARNING +_LIBCPP_WARNING("<experimental/tuple> has been removed. Use <tuple> instead.") +#else +# warning "<experimental/tuple> has been removed. Use <tuple> instead." +#endif + +#endif // _LIBCPP_EXPERIMENTAL_TUPLE |