Another round of clang-formatting.

This commit is contained in:
Neil MacIntosh 2016-08-01 13:10:02 -07:00
parent 8e31f53f8a
commit 1bd2d04c2e
3 changed files with 11 additions and 7 deletions

View File

@ -1594,13 +1594,12 @@ public:
// Free functions for manipulating spans // Free functions for manipulating spans
// //
// reshape a multi_span into a different dimensionality // reshape a multi_span into a different dimensionality
// DimCount and Enabled here are workarounds for a bug in MSVC 2015 // DimCount and Enabled here are workarounds for a bug in MSVC 2015
template <typename SpanType, typename... Dimensions2, size_t DimCount = sizeof...(Dimensions2), template <typename SpanType, typename... Dimensions2, size_t DimCount = sizeof...(Dimensions2),
bool Enabled = (DimCount > 0), typename = std::enable_if_t<Enabled> > bool Enabled = (DimCount > 0), typename = std::enable_if_t<Enabled>>
constexpr auto constexpr auto as_multi_span(SpanType s, Dimensions2... dims)
as_multi_span(SpanType s, Dimensions2... dims) -> multi_span<typename SpanType::value_type, Dimensions2::value...> -> multi_span<typename SpanType::value_type, Dimensions2::value...>
{ {
static_assert(details::is_multi_span<SpanType>::value, static_assert(details::is_multi_span<SpanType>::value,
"Variadic as_multi_span() is for reshaping existing spans."); "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...> -> multi_span<std::remove_all_extents_t<T>, Dimensions...>
{ {
return {reinterpret_cast<std::remove_all_extents_t<T>*>(ptr), 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> template <typename T>

View File

@ -579,7 +579,11 @@ public:
#ifndef GSL_MSVC_NO_DEFAULT_MOVE_CTOR #ifndef GSL_MSVC_NO_DEFAULT_MOVE_CTOR
constexpr span& operator=(span&& other) noexcept = default; constexpr span& operator=(span&& other) noexcept = default;
#else #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 #endif
// [span.sub], span subviews // [span.sub], span subviews
template <std::ptrdiff_t Count> template <std::ptrdiff_t Count>

View File

@ -22,9 +22,9 @@
#include "gsl_assert.h" #include "gsl_assert.h"
#include "gsl_util.h" #include "gsl_util.h"
#include "span.h" #include "span.h"
#include <cstdint>
#include <cstring> #include <cstring>
#include <string> #include <string>
#include <cstdint>
#ifdef _MSC_VER #ifdef _MSC_VER