mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Another round of clang-formatting.
This commit is contained in:
parent
8e31f53f8a
commit
1bd2d04c2e
@ -1594,13 +1594,12 @@ public:
|
||||
// Free functions for manipulating spans
|
||||
//
|
||||
|
||||
|
||||
// reshape a multi_span into a different dimensionality
|
||||
// DimCount and Enabled here are workarounds for a bug in MSVC 2015
|
||||
template <typename SpanType, typename... Dimensions2, size_t DimCount = sizeof...(Dimensions2),
|
||||
bool Enabled = (DimCount > 0), typename = std::enable_if_t<Enabled>>
|
||||
constexpr auto
|
||||
as_multi_span(SpanType s, Dimensions2... dims) -> multi_span<typename SpanType::value_type, Dimensions2::value...>
|
||||
constexpr auto as_multi_span(SpanType s, Dimensions2... dims)
|
||||
-> multi_span<typename SpanType::value_type, Dimensions2::value...>
|
||||
{
|
||||
static_assert(details::is_multi_span<SpanType>::value,
|
||||
"Variadic as_multi_span() is for reshaping existing spans.");
|
||||
@ -1687,7 +1686,8 @@ constexpr auto as_multi_span(T* const& ptr, dim<Dimensions>... args)
|
||||
-> multi_span<std::remove_all_extents_t<T>, Dimensions...>
|
||||
{
|
||||
return {reinterpret_cast<std::remove_all_extents_t<T>*>(ptr),
|
||||
details::static_as_multi_span_helper<static_bounds<Dimensions...>>(args..., details::Sep{})};
|
||||
details::static_as_multi_span_helper<static_bounds<Dimensions...>>(args...,
|
||||
details::Sep{})};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
@ -579,7 +579,11 @@ public:
|
||||
#ifndef GSL_MSVC_NO_DEFAULT_MOVE_CTOR
|
||||
constexpr span& operator=(span&& other) noexcept = default;
|
||||
#else
|
||||
constexpr span& operator=(span&& other) noexcept { storage_ = std::move(other.storage_); return *this; }
|
||||
constexpr span& operator=(span&& other) noexcept
|
||||
{
|
||||
storage_ = std::move(other.storage_);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
// [span.sub], span subviews
|
||||
template <std::ptrdiff_t Count>
|
||||
|
@ -22,9 +22,9 @@
|
||||
#include "gsl_assert.h"
|
||||
#include "gsl_util.h"
|
||||
#include "span.h"
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user