diff options
author | Andrey Khalyavin <halyavin@gmail.com> | 2022-02-10 16:46:29 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:29 +0300 |
commit | f773626848a7c7456803654292e716b83d69cc12 (patch) | |
tree | db052dfcf9134f492bdbb962cb6c16cea58e1ed3 /contrib/libs/cxxsupp/libcxx/include/initializer_list | |
parent | f43ab775d197d300eb67bd4497632b909cd7c2a5 (diff) | |
download | ydb-f773626848a7c7456803654292e716b83d69cc12.tar.gz |
Restoring authorship annotation for Andrey Khalyavin <halyavin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/initializer_list')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/initializer_list | 246 |
1 files changed, 123 insertions, 123 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/initializer_list b/contrib/libs/cxxsupp/libcxx/include/initializer_list index 89502392ab..bfe3e9f366 100644 --- a/contrib/libs/cxxsupp/libcxx/include/initializer_list +++ b/contrib/libs/cxxsupp/libcxx/include/initializer_list @@ -1,131 +1,131 @@ -// -*- C++ -*- -//===----------------------- initializer_list -----------------------------===// -// +// -*- C++ -*- +//===----------------------- initializer_list -----------------------------===// +// // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_INITIALIZER_LIST -#define _LIBCPP_INITIALIZER_LIST - -/* - initializer_list synopsis - -namespace std -{ - -template<class E> -class initializer_list -{ -public: - typedef E value_type; - typedef const E& reference; - typedef const E& const_reference; - typedef size_t size_type; - - typedef const E* iterator; - typedef const E* const_iterator; - - initializer_list() noexcept; // constexpr in C++14 - - size_t size() const noexcept; // constexpr in C++14 - const E* begin() const noexcept; // constexpr in C++14 - const E* end() const noexcept; // constexpr in C++14 -}; - -template<class E> const E* begin(initializer_list<E> il) noexcept; // constexpr in C++14 -template<class E> const E* end(initializer_list<E> il) noexcept; // constexpr in C++14 - -} // std - -*/ - -#include <__config> -#include <cstddef> - -#if defined(_LIBCPP_COMPILER_MSVC) && !defined(__clang__) - -#include _LIBCPP_MSVC_INCLUDE(yvals.h) -#include _LIBCPP_MSVC_INCLUDE(initializer_list) - -#else - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - -namespace std // purposefully not versioned -{ - -#ifndef _LIBCPP_CXX03_LANG - -template<class _Ep> -class _LIBCPP_TEMPLATE_VIS initializer_list -{ - const _Ep* __begin_; - size_t __size_; - - _LIBCPP_INLINE_VISIBILITY - _LIBCPP_CONSTEXPR_AFTER_CXX11 - initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT - : __begin_(__b), - __size_(__s) - {} -public: - typedef _Ep value_type; - typedef const _Ep& reference; - typedef const _Ep& const_reference; - typedef size_t size_type; - - typedef const _Ep* iterator; - typedef const _Ep* const_iterator; - - _LIBCPP_INLINE_VISIBILITY - _LIBCPP_CONSTEXPR_AFTER_CXX11 - initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {} - +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP_INITIALIZER_LIST +#define _LIBCPP_INITIALIZER_LIST + +/* + initializer_list synopsis + +namespace std +{ + +template<class E> +class initializer_list +{ +public: + typedef E value_type; + typedef const E& reference; + typedef const E& const_reference; + typedef size_t size_type; + + typedef const E* iterator; + typedef const E* const_iterator; + + initializer_list() noexcept; // constexpr in C++14 + + size_t size() const noexcept; // constexpr in C++14 + const E* begin() const noexcept; // constexpr in C++14 + const E* end() const noexcept; // constexpr in C++14 +}; + +template<class E> const E* begin(initializer_list<E> il) noexcept; // constexpr in C++14 +template<class E> const E* end(initializer_list<E> il) noexcept; // constexpr in C++14 + +} // std + +*/ + +#include <__config> +#include <cstddef> + +#if defined(_LIBCPP_COMPILER_MSVC) && !defined(__clang__) + +#include _LIBCPP_MSVC_INCLUDE(yvals.h) +#include _LIBCPP_MSVC_INCLUDE(initializer_list) + +#else + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +namespace std // purposefully not versioned +{ + +#ifndef _LIBCPP_CXX03_LANG + +template<class _Ep> +class _LIBCPP_TEMPLATE_VIS initializer_list +{ + const _Ep* __begin_; + size_t __size_; + + _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 + initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT + : __begin_(__b), + __size_(__s) + {} +public: + typedef _Ep value_type; + typedef const _Ep& reference; + typedef const _Ep& const_reference; + typedef size_t size_type; + + typedef const _Ep* iterator; + typedef const _Ep* const_iterator; + + _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 + initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {} + initializer_list(const initializer_list&) = default; initializer_list(initializer_list&&) = default; initializer_list& operator=(const initializer_list&) = delete; initializer_list& operator=(initializer_list&&) = delete; - _LIBCPP_INLINE_VISIBILITY - _LIBCPP_CONSTEXPR_AFTER_CXX11 - size_t size() const _NOEXCEPT {return __size_;} - - _LIBCPP_INLINE_VISIBILITY - _LIBCPP_CONSTEXPR_AFTER_CXX11 - const _Ep* begin() const _NOEXCEPT {return __begin_;} - - _LIBCPP_INLINE_VISIBILITY - _LIBCPP_CONSTEXPR_AFTER_CXX11 - const _Ep* end() const _NOEXCEPT {return __begin_ + __size_;} -}; - -template<class _Ep> -inline _LIBCPP_INLINE_VISIBILITY -_LIBCPP_CONSTEXPR_AFTER_CXX11 -const _Ep* -begin(initializer_list<_Ep> __il) _NOEXCEPT -{ - return __il.begin(); -} - -template<class _Ep> -inline _LIBCPP_INLINE_VISIBILITY -_LIBCPP_CONSTEXPR_AFTER_CXX11 -const _Ep* -end(initializer_list<_Ep> __il) _NOEXCEPT -{ - return __il.end(); -} - -#endif // !defined(_LIBCPP_CXX03_LANG) - -} // std - -#endif // _LIBCPP_COMPILER_MSVC - -#endif // _LIBCPP_INITIALIZER_LIST + _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 + size_t size() const _NOEXCEPT {return __size_;} + + _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 + const _Ep* begin() const _NOEXCEPT {return __begin_;} + + _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 + const _Ep* end() const _NOEXCEPT {return __begin_ + __size_;} +}; + +template<class _Ep> +inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_CONSTEXPR_AFTER_CXX11 +const _Ep* +begin(initializer_list<_Ep> __il) _NOEXCEPT +{ + return __il.begin(); +} + +template<class _Ep> +inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_CONSTEXPR_AFTER_CXX11 +const _Ep* +end(initializer_list<_Ep> __il) _NOEXCEPT +{ + return __il.end(); +} + +#endif // !defined(_LIBCPP_CXX03_LANG) + +} // std + +#endif // _LIBCPP_COMPILER_MSVC + +#endif // _LIBCPP_INITIALIZER_LIST |