From 5538021e76cf3ebfc1138a1c2fbe345fc08dc8c5 Mon Sep 17 00:00:00 2001 From: Neil MacIntosh Date: Sat, 10 Feb 2018 20:00:44 -0800 Subject: [PATCH] Removed unnecessary move operations. --- include/gsl/span | 15 +-------------- include/gsl/string_span | 6 ------ 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/include/gsl/span b/include/gsl/span index 51b46f2..76f16e1 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -389,7 +389,6 @@ public: } constexpr span(const span& other) GSL_NOEXCEPT = default; - constexpr span(span&& other) GSL_NOEXCEPT = default; template < 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::value && - details::is_allowed_element_type_conversion::value>> - constexpr span(span&& other) - : storage_(other.data(), details::extent_type(other.size())) - { - } - ~span() GSL_NOEXCEPT = default; constexpr span& operator=(const span& other) GSL_NOEXCEPT = default; - - constexpr span& operator=(span&& other) GSL_NOEXCEPT = default; - + // [span.sub], span subviews template constexpr span first() const diff --git a/include/gsl/string_span b/include/gsl/string_span index 42f8975..eb4c707 100644 --- a/include/gsl/string_span +++ b/include/gsl/string_span @@ -194,15 +194,9 @@ public: // copy 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 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 firstElem, pointer lastElem) : span_(firstElem, lastElem) {}