mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Removed unnecessary move operations.
This commit is contained in:
parent
2bdbba7418
commit
5538021e76
@ -389,7 +389,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
constexpr span(const span& other) GSL_NOEXCEPT = default;
|
constexpr span(const span& other) GSL_NOEXCEPT = default;
|
||||||
constexpr span(span&& other) GSL_NOEXCEPT = default;
|
|
||||||
|
|
||||||
template <
|
template <
|
||||||
class OtherElementType, std::ptrdiff_t OtherExtent,
|
class OtherElementType, std::ptrdiff_t OtherExtent,
|
||||||
@ -401,21 +400,9 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
template <
|
|
||||||
class OtherElementType, std::ptrdiff_t OtherExtent,
|
|
||||||
class = std::enable_if_t<
|
|
||||||
details::is_allowed_extent_conversion<OtherExtent, Extent>::value &&
|
|
||||||
details::is_allowed_element_type_conversion<OtherElementType, element_type>::value>>
|
|
||||||
constexpr span(span<OtherElementType, OtherExtent>&& other)
|
|
||||||
: storage_(other.data(), details::extent_type<OtherExtent>(other.size()))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
~span() GSL_NOEXCEPT = default;
|
~span() GSL_NOEXCEPT = default;
|
||||||
constexpr span& operator=(const span& other) GSL_NOEXCEPT = default;
|
constexpr span& operator=(const span& other) GSL_NOEXCEPT = default;
|
||||||
|
|
||||||
constexpr span& operator=(span&& other) GSL_NOEXCEPT = default;
|
|
||||||
|
|
||||||
// [span.sub], span subviews
|
// [span.sub], span subviews
|
||||||
template <std::ptrdiff_t Count>
|
template <std::ptrdiff_t Count>
|
||||||
constexpr span<element_type, Count> first() const
|
constexpr span<element_type, Count> first() const
|
||||||
|
@ -194,15 +194,9 @@ public:
|
|||||||
// copy
|
// copy
|
||||||
constexpr basic_string_span(const basic_string_span& other) GSL_NOEXCEPT = default;
|
constexpr basic_string_span(const basic_string_span& other) GSL_NOEXCEPT = default;
|
||||||
|
|
||||||
// move
|
|
||||||
constexpr basic_string_span(basic_string_span&& other) GSL_NOEXCEPT = default;
|
|
||||||
|
|
||||||
// assign
|
// assign
|
||||||
constexpr basic_string_span& operator=(const basic_string_span& other) GSL_NOEXCEPT = default;
|
constexpr basic_string_span& operator=(const basic_string_span& other) GSL_NOEXCEPT = default;
|
||||||
|
|
||||||
// move assign
|
|
||||||
constexpr basic_string_span& operator=(basic_string_span&& other) GSL_NOEXCEPT = default;
|
|
||||||
|
|
||||||
constexpr basic_string_span(pointer ptr, index_type length) : span_(ptr, length) {}
|
constexpr basic_string_span(pointer ptr, index_type length) : span_(ptr, length) {}
|
||||||
constexpr basic_string_span(pointer firstElem, pointer lastElem) : span_(firstElem, lastElem) {}
|
constexpr basic_string_span(pointer firstElem, pointer lastElem) : span_(firstElem, lastElem) {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user