[NFC][libc++] Consistently use spaces to indent
rdar://problem/19988944
llvm-svn: 338933
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 7c3492b00d99c81d4a58a8015dbe313eabaea799
diff --git a/include/span b/include/span
index db8f836..5a77ff8 100644
--- a/include/span
+++ b/include/span
@@ -39,11 +39,11 @@
// [span.objectrep], views of object representation
template <class ElementType, ptrdiff_t Extent>
- span<const byte, ((Extent == dynamic_extent) ? dynamic_extent :
+ span<const byte, ((Extent == dynamic_extent) ? dynamic_extent :
(static_cast<ptrdiff_t>(sizeof(ElementType)) * Extent))> as_bytes(span<ElementType, Extent> s) noexcept;
template <class ElementType, ptrdiff_t Extent>
- span< byte, ((Extent == dynamic_extent) ? dynamic_extent :
+ span< byte, ((Extent == dynamic_extent) ? dynamic_extent :
(static_cast<ptrdiff_t>(sizeof(ElementType)) * Extent))> as_writable_bytes(span<ElementType, Extent> s) noexcept;
@@ -123,7 +123,7 @@
template<class T, size_t N>
span(T (&)[N]) -> span<T, N>;
-
+
template<class T, size_t N>
span(array<T, N>&) -> span<T, N>;
@@ -194,8 +194,8 @@
decltype(size(declval<_Tp>())),
// remove_pointer_t<decltype(data(cont))>(*)[] is convertible to ElementType(*)[]
typename enable_if<
- is_convertible_v<remove_pointer_t<decltype(data(declval<_Tp &>()))>(*)[],
- _ElementType(*)[]>,
+ is_convertible_v<remove_pointer_t<decltype(data(declval<_Tp &>()))>(*)[],
+ _ElementType(*)[]>,
nullptr_t>::type
>>
: public true_type {};
@@ -221,7 +221,7 @@
static constexpr index_type extent = _Extent;
static_assert (_Extent >= 0, "Can't have a span with an extent < 0");
-// [span.cons], span constructors, copy, assignment, and destructor
+// [span.cons], span constructors, copy, assignment, and destructor
_LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data{nullptr}
{ static_assert(_Extent == 0, "Can't default construct a statically sized span with size > 0"); }
@@ -287,7 +287,7 @@
static_assert(_Count <= _Extent, "Count out of range in span::last()");
return {data() + size() - _Count, _Count};
}
-
+
_LIBCPP_INLINE_VISIBILITY
constexpr span<element_type, dynamic_extent> first(index_type __count) const noexcept
{
@@ -315,7 +315,7 @@
inline _LIBCPP_INLINE_VISIBILITY
constexpr span<element_type, dynamic_extent>
subspan(index_type __offset, index_type __count = dynamic_extent) const noexcept
- {
+ {
_LIBCPP_ASSERT( __offset >= 0 && __offset <= size(), "Offset out of range in span::subspan(offset, count)");
_LIBCPP_ASSERT((__count >= 0 && __count <= size()) || __count == dynamic_extent, "Count out of range in span::subspan(offset, count)");
if (__count == dynamic_extent)
@@ -331,14 +331,14 @@
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](index_type __idx) const noexcept
{
_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_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; }
@@ -358,7 +358,7 @@
__data = __other.__data;
__other.__data = __p;
}
-
+
_LIBCPP_INLINE_VISIBILITY span<const byte, _Extent * sizeof(element_type)> __as_bytes() const noexcept
{ return {reinterpret_cast<const byte *>(data()), size_bytes()}; }
@@ -392,7 +392,7 @@
static constexpr index_type extent = dynamic_extent;
-// [span.cons], span constructors, copy, assignment, and destructor
+// [span.cons], span constructors, copy, assignment, and destructor
_LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data{nullptr}, __size{0} {}
constexpr span (const span&) noexcept = default;
@@ -408,7 +408,7 @@
template <size_t _Sz>
inline _LIBCPP_INLINE_VISIBILITY
constexpr span(array<value_type, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {}
-
+
template <size_t _Sz>
inline _LIBCPP_INLINE_VISIBILITY
constexpr span(const array<value_type, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {}
@@ -460,7 +460,7 @@
_LIBCPP_ASSERT(__count >= 0 && __count <= size(), "Count out of range in span::first(count)");
return {data(), __count};
}
-
+
_LIBCPP_INLINE_VISIBILITY
constexpr span<element_type, dynamic_extent> last (index_type __count) const noexcept
{
@@ -480,7 +480,7 @@
constexpr span<element_type, dynamic_extent>
inline _LIBCPP_INLINE_VISIBILITY
subspan(index_type __offset, index_type __count = dynamic_extent) const noexcept
- {
+ {
_LIBCPP_ASSERT( __offset >= 0 && __offset <= size(), "Offset out of range in span::subspan(offset, count)");
_LIBCPP_ASSERT((__count >= 0 && __count <= size()) || __count == dynamic_extent, "count out of range in span::subspan(offset, count)");
if (__count == dynamic_extent)
@@ -496,14 +496,14 @@
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](index_type __idx) const noexcept
{
_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_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; }
@@ -553,7 +553,7 @@
constexpr bool
operator< (const span<_Tp1, _Extent1>& __lhs, const span<_Tp2, _Extent2>& __rhs)
{ return lexicographical_compare (__lhs.begin(), __lhs.end(), __rhs.begin(), __rhs.end()); }
-
+
template <class _Tp1, ptrdiff_t _Extent1, class _Tp2, ptrdiff_t _Extent2>
constexpr bool
operator<=(const span<_Tp1, _Extent1>& __lhs, const span<_Tp2, _Extent2>& __rhs)
@@ -563,7 +563,7 @@
constexpr bool
operator> (const span<_Tp1, _Extent1>& __lhs, const span<_Tp2, _Extent2>& __rhs)
{ return __rhs < __lhs; }
-
+
template <class _Tp1, ptrdiff_t _Extent1, class _Tp2, ptrdiff_t _Extent2>
constexpr bool
operator>=(const span<_Tp1, _Extent1>& __lhs, const span<_Tp2, _Extent2>& __rhs)
@@ -571,7 +571,7 @@
// as_bytes & as_writeable_bytes
template <class _Tp, ptrdiff_t _Extent>
- auto as_bytes(span<_Tp, _Extent> __s) noexcept
+ auto as_bytes(span<_Tp, _Extent> __s) noexcept
-> decltype(__s.__as_bytes())
{ return __s.__as_bytes(); }
@@ -588,7 +588,7 @@
// Deduction guides
template<class _Tp, size_t _Sz>
span(_Tp (&)[_Sz]) -> span<_Tp, _Sz>;
-
+
template<class _Tp, size_t _Sz>
span(array<_Tp, _Sz>&) -> span<_Tp, _Sz>;