[NFC][libc++] Consistently use spaces to indent
rdar://problem/19988944 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338933 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1488,7 +1488,7 @@ private:
|
|||||||
void __copy_assign_alloc(const __tree& __t, true_type)
|
void __copy_assign_alloc(const __tree& __t, true_type)
|
||||||
{
|
{
|
||||||
if (__node_alloc() != __t.__node_alloc())
|
if (__node_alloc() != __t.__node_alloc())
|
||||||
clear();
|
clear();
|
||||||
__node_alloc() = __t.__node_alloc();
|
__node_alloc() = __t.__node_alloc();
|
||||||
}
|
}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ void __throw_bad_any_cast()
|
|||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw bad_any_cast();
|
throw bad_any_cast();
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -238,9 +238,9 @@ __bitset<_N_words, _Size>::__init(unsigned long long __v, false_type) _NOEXCEPT
|
|||||||
size_t __sz = _Size;
|
size_t __sz = _Size;
|
||||||
for (size_t __i = 0; __i < sizeof(__t)/sizeof(__t[0]); ++__i, __v >>= __bits_per_word, __sz -= __bits_per_word )
|
for (size_t __i = 0; __i < sizeof(__t)/sizeof(__t[0]); ++__i, __v >>= __bits_per_word, __sz -= __bits_per_word )
|
||||||
if ( __sz < __bits_per_word)
|
if ( __sz < __bits_per_word)
|
||||||
__t[__i] = static_cast<__storage_type>(__v) & ( 1ULL << __sz ) - 1;
|
__t[__i] = static_cast<__storage_type>(__v) & ( 1ULL << __sz ) - 1;
|
||||||
else
|
else
|
||||||
__t[__i] = static_cast<__storage_type>(__v);
|
__t[__i] = static_cast<__storage_type>(__v);
|
||||||
|
|
||||||
_VSTD::copy(__t, __t + sizeof(__t)/sizeof(__t[0]), __first_);
|
_VSTD::copy(__t, __t + sizeof(__t)/sizeof(__t[0]), __first_);
|
||||||
_VSTD::fill(__first_ + sizeof(__t)/sizeof(__t[0]), __first_ + sizeof(__first_)/sizeof(__first_[0]),
|
_VSTD::fill(__first_ + sizeof(__t)/sizeof(__t[0]), __first_ + sizeof(__first_)/sizeof(__first_[0]),
|
||||||
@@ -254,7 +254,7 @@ __bitset<_N_words, _Size>::__init(unsigned long long __v, true_type) _NOEXCEPT
|
|||||||
{
|
{
|
||||||
__first_[0] = __v;
|
__first_[0] = __v;
|
||||||
if (_Size < __bits_per_word)
|
if (_Size < __bits_per_word)
|
||||||
__first_[0] &= ( 1ULL << _Size ) - 1;
|
__first_[0] &= ( 1ULL << _Size ) - 1;
|
||||||
|
|
||||||
_VSTD::fill(__first_ + 1, __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0));
|
_VSTD::fill(__first_ + 1, __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0));
|
||||||
}
|
}
|
||||||
@@ -270,8 +270,8 @@ __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
|
|||||||
: __first_{__v}
|
: __first_{__v}
|
||||||
#elif __SIZEOF_SIZE_T__ == 4
|
#elif __SIZEOF_SIZE_T__ == 4
|
||||||
: __first_{static_cast<__storage_type>(__v),
|
: __first_{static_cast<__storage_type>(__v),
|
||||||
_Size >= 2 * __bits_per_word ? static_cast<__storage_type>(__v >> __bits_per_word)
|
_Size >= 2 * __bits_per_word ? static_cast<__storage_type>(__v >> __bits_per_word)
|
||||||
: static_cast<__storage_type>((__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)) - 1)}
|
: static_cast<__storage_type>((__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)) - 1)}
|
||||||
#else
|
#else
|
||||||
#error This constructor has not been ported to this platform
|
#error This constructor has not been ported to this platform
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -746,7 +746,7 @@ unspecified
|
|||||||
parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
|
parse(const basic_string<charT, traits, Alloc>& format, Parsable& tp,
|
||||||
basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
|
basic_string<charT, traits, Alloc>& abbrev, minutes& offset);
|
||||||
|
|
||||||
inline constexpr last_spec last{}; // C++20
|
inline constexpr last_spec last{}; // C++20
|
||||||
inline constexpr chrono::weekday Sunday{0}; // C++20
|
inline constexpr chrono::weekday Sunday{0}; // C++20
|
||||||
inline constexpr chrono::weekday Monday{1}; // C++20
|
inline constexpr chrono::weekday Monday{1}; // C++20
|
||||||
inline constexpr chrono::weekday Tuesday{2}; // C++20
|
inline constexpr chrono::weekday Tuesday{2}; // C++20
|
||||||
|
|||||||
@@ -66,10 +66,10 @@ enum class byte : unsigned char {};
|
|||||||
|
|
||||||
constexpr byte operator| (byte __lhs, byte __rhs) noexcept
|
constexpr byte operator| (byte __lhs, byte __rhs) noexcept
|
||||||
{
|
{
|
||||||
return static_cast<byte>(
|
return static_cast<byte>(
|
||||||
static_cast<unsigned char>(
|
static_cast<unsigned char>(
|
||||||
static_cast<unsigned int>(__lhs) | static_cast<unsigned int>(__rhs)
|
static_cast<unsigned int>(__lhs) | static_cast<unsigned int>(__rhs)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
|
constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
|
||||||
@@ -77,10 +77,10 @@ constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
|
|||||||
|
|
||||||
constexpr byte operator& (byte __lhs, byte __rhs) noexcept
|
constexpr byte operator& (byte __lhs, byte __rhs) noexcept
|
||||||
{
|
{
|
||||||
return static_cast<byte>(
|
return static_cast<byte>(
|
||||||
static_cast<unsigned char>(
|
static_cast<unsigned char>(
|
||||||
static_cast<unsigned int>(__lhs) & static_cast<unsigned int>(__rhs)
|
static_cast<unsigned int>(__lhs) & static_cast<unsigned int>(__rhs)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
|
constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
|
||||||
@@ -88,10 +88,10 @@ constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
|
|||||||
|
|
||||||
constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
|
constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
|
||||||
{
|
{
|
||||||
return static_cast<byte>(
|
return static_cast<byte>(
|
||||||
static_cast<unsigned char>(
|
static_cast<unsigned char>(
|
||||||
static_cast<unsigned int>(__lhs) ^ static_cast<unsigned int>(__rhs)
|
static_cast<unsigned int>(__lhs) ^ static_cast<unsigned int>(__rhs)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
|
constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
|
||||||
|
|||||||
@@ -1405,7 +1405,7 @@ void __throw_bad_function_call()
|
|||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw bad_function_call();
|
throw bad_function_call();
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ void __throw_bad_array_length()
|
|||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw bad_array_length();
|
throw bad_array_length();
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -104,15 +104,15 @@ template<class InputIterator, class OutputIterator, class T,
|
|||||||
|
|
||||||
template<class InputIterator, class OutputIterator,
|
template<class InputIterator, class OutputIterator,
|
||||||
class BinaryOperation, class UnaryOperation>
|
class BinaryOperation, class UnaryOperation>
|
||||||
OutputIterator
|
OutputIterator
|
||||||
transform_inclusive_scan(InputIterator first, InputIterator last,
|
transform_inclusive_scan(InputIterator first, InputIterator last,
|
||||||
OutputIterator result,
|
OutputIterator result,
|
||||||
BinaryOperation binary_op, UnaryOperation unary_op); // C++17
|
BinaryOperation binary_op, UnaryOperation unary_op); // C++17
|
||||||
|
|
||||||
template<class InputIterator, class OutputIterator,
|
template<class InputIterator, class OutputIterator,
|
||||||
class BinaryOperation, class UnaryOperation, class T>
|
class BinaryOperation, class UnaryOperation, class T>
|
||||||
OutputIterator
|
OutputIterator
|
||||||
transform_inclusive_scan(InputIterator first, InputIterator last,
|
transform_inclusive_scan(InputIterator first, InputIterator last,
|
||||||
OutputIterator result,
|
OutputIterator result,
|
||||||
BinaryOperation binary_op, UnaryOperation unary_op,
|
BinaryOperation binary_op, UnaryOperation unary_op,
|
||||||
T init); // C++17
|
T init); // C++17
|
||||||
|
|||||||
20
include/span
20
include/span
@@ -194,8 +194,8 @@ struct __is_span_compatible_container<_Tp, _ElementType,
|
|||||||
decltype(size(declval<_Tp>())),
|
decltype(size(declval<_Tp>())),
|
||||||
// remove_pointer_t<decltype(data(cont))>(*)[] is convertible to ElementType(*)[]
|
// remove_pointer_t<decltype(data(cont))>(*)[] is convertible to ElementType(*)[]
|
||||||
typename enable_if<
|
typename enable_if<
|
||||||
is_convertible_v<remove_pointer_t<decltype(data(declval<_Tp &>()))>(*)[],
|
is_convertible_v<remove_pointer_t<decltype(data(declval<_Tp &>()))>(*)[],
|
||||||
_ElementType(*)[]>,
|
_ElementType(*)[]>,
|
||||||
nullptr_t>::type
|
nullptr_t>::type
|
||||||
>>
|
>>
|
||||||
: public true_type {};
|
: public true_type {};
|
||||||
@@ -331,14 +331,14 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](index_type __idx) const noexcept
|
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](index_type __idx) const noexcept
|
||||||
{
|
{
|
||||||
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T,N>[] index out of bounds");
|
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T,N>[] index out of bounds");
|
||||||
return __data[__idx];
|
return __data[__idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY constexpr reference operator()(index_type __idx) const noexcept
|
_LIBCPP_INLINE_VISIBILITY constexpr reference operator()(index_type __idx) const noexcept
|
||||||
{
|
{
|
||||||
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T,N>() index out of bounds");
|
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T,N>() index out of bounds");
|
||||||
return __data[__idx];
|
return __data[__idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; }
|
_LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; }
|
||||||
|
|
||||||
@@ -496,14 +496,14 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](index_type __idx) const noexcept
|
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](index_type __idx) const noexcept
|
||||||
{
|
{
|
||||||
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T>[] index out of bounds");
|
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T>[] index out of bounds");
|
||||||
return __data[__idx];
|
return __data[__idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY constexpr reference operator()(index_type __idx) const noexcept
|
_LIBCPP_INLINE_VISIBILITY constexpr reference operator()(index_type __idx) const noexcept
|
||||||
{
|
{
|
||||||
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T>() index out of bounds");
|
_LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T>() index out of bounds");
|
||||||
return __data[__idx];
|
return __data[__idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; }
|
_LIBCPP_INLINE_VISIBILITY constexpr pointer data() const noexcept { return __data; }
|
||||||
|
|
||||||
|
|||||||
@@ -473,12 +473,12 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::str(const string_type& __s)
|
|||||||
{
|
{
|
||||||
while (__sz > INT_MAX)
|
while (__sz > INT_MAX)
|
||||||
{
|
{
|
||||||
this->pbump(INT_MAX);
|
this->pbump(INT_MAX);
|
||||||
__sz -= INT_MAX;
|
__sz -= INT_MAX;
|
||||||
}
|
}
|
||||||
if (__sz > 0)
|
if (__sz > 0)
|
||||||
this->pbump(__sz);
|
this->pbump(__sz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ void __throw_logic_error(const char*__msg)
|
|||||||
throw logic_error(__msg);
|
throw logic_error(__msg);
|
||||||
#else
|
#else
|
||||||
((void)__msg);
|
((void)__msg);
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,7 +203,7 @@ void __throw_domain_error(const char*__msg)
|
|||||||
throw domain_error(__msg);
|
throw domain_error(__msg);
|
||||||
#else
|
#else
|
||||||
((void)__msg);
|
((void)__msg);
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,7 +214,7 @@ void __throw_invalid_argument(const char*__msg)
|
|||||||
throw invalid_argument(__msg);
|
throw invalid_argument(__msg);
|
||||||
#else
|
#else
|
||||||
((void)__msg);
|
((void)__msg);
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ void __throw_length_error(const char*__msg)
|
|||||||
throw length_error(__msg);
|
throw length_error(__msg);
|
||||||
#else
|
#else
|
||||||
((void)__msg);
|
((void)__msg);
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,7 +236,7 @@ void __throw_out_of_range(const char*__msg)
|
|||||||
throw out_of_range(__msg);
|
throw out_of_range(__msg);
|
||||||
#else
|
#else
|
||||||
((void)__msg);
|
((void)__msg);
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ void __throw_range_error(const char*__msg)
|
|||||||
throw range_error(__msg);
|
throw range_error(__msg);
|
||||||
#else
|
#else
|
||||||
((void)__msg);
|
((void)__msg);
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ void __throw_bad_cast()
|
|||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw bad_cast();
|
throw bad_cast();
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
_LIBCPP_END_NAMESPACE_STD
|
_LIBCPP_END_NAMESPACE_STD
|
||||||
|
|||||||
Reference in New Issue
Block a user