[libcxx-commits] [libcxx] 00e740f - [NFC][libc++] Addresses LWG3903.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 8 03:54:54 PDT 2023


Author: Mark de Wever
Date: 2023-07-08T12:54:49+02:00
New Revision: 00e740f1e96d37c4b89b748540f7b48a0131d588

URL: https://github.com/llvm/llvm-project/commit/00e740f1e96d37c4b89b748540f7b48a0131d588
DIFF: https://github.com/llvm/llvm-project/commit/00e740f1e96d37c4b89b748540f7b48a0131d588.diff

LOG: [NFC][libc++] Addresses LWG3903.

Note libc++ actually implemented this wording from the start (D49338).
The Clang version is the same as the version that implements
  P0122R7 <span>

Implements
- LWG3903 span destructor is redundantly noexcept

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D153284

Added: 
    

Modified: 
    libcxx/docs/Status/Cxx2cIssues.csv
    libcxx/include/span

Removed: 
    


################################################################################
diff  --git a/libcxx/docs/Status/Cxx2cIssues.csv b/libcxx/docs/Status/Cxx2cIssues.csv
index f46305b29c3524..5677256c5daf61 100644
--- a/libcxx/docs/Status/Cxx2cIssues.csv
+++ b/libcxx/docs/Status/Cxx2cIssues.csv
@@ -5,7 +5,7 @@
 "`3887 <https://wg21.link/LWG3887>`__","Version macro for ``allocate_at_least``","Varna June 2023","","",""
 "`3893 <https://wg21.link/LWG3893>`__","LWG 3661 broke ``atomic<shared_ptr<T>> a; a = nullptr;``","Varna June 2023","","",""
 "`3894 <https://wg21.link/LWG3894>`__","``generator::promise_type::yield_value(ranges::elements_of<Rng, Alloc>)`` should not be ``noexcept``","Varna June 2023","","",""
-"`3903 <https://wg21.link/LWG3903>`__","span destructor is redundantly noexcept","Varna June 2023","","",""
+"`3903 <https://wg21.link/LWG3903>`__","span destructor is redundantly noexcept","Varna June 2023","|Complete|","Clang 7.0",""
 "`3904 <https://wg21.link/LWG3904>`__","``lazy_split_view::outer-iterator``'s const-converting constructor isn't setting ``trailing_empty_``","Varna June 2023","","","|ranges|"
 "`3905 <https://wg21.link/LWG3905>`__","Type of ``std::fexcept_t``","Varna June 2023","","",""
 "`3912 <https://wg21.link/LWG3912>`__","``enumerate_view::iterator::operator-`` should be ``noexcept``","Varna June 2023","","","|ranges|"

diff  --git a/libcxx/include/span b/libcxx/include/span
index af36d80b78b224..582bdbf5c14069 100644
--- a/libcxx/include/span
+++ b/libcxx/include/span
@@ -71,7 +71,6 @@ public:
     constexpr span(const span& other) noexcept = default;
     template <class OtherElementType, size_t OtherExtent>
         constexpr explicit(Extent != dynamic_extent) span(const span<OtherElementType, OtherExtent>& s) noexcept;
-    ~span() noexcept = default;
     constexpr span& operator=(const span& other) noexcept = default;
 
     // [span.sub], span subviews
@@ -277,9 +276,6 @@ public:
           _LIBCPP_ASSERT_UNCATEGORIZED(_Extent == __other.size(), "size mismatch in span's constructor (other span)");
         }
 
-
-//  ~span() noexcept = default;
-
     template <size_t _Count>
     _LIBCPP_INLINE_VISIBILITY
     constexpr span<element_type, _Count> first() const noexcept
@@ -448,8 +444,6 @@ public:
         constexpr span(const span<_OtherElementType, _OtherExtent>& __other)  noexcept
         : __data_{__other.data()}, __size_{__other.size()} {}
 
-//    ~span() noexcept = default;
-
     template <size_t _Count>
     _LIBCPP_INLINE_VISIBILITY
     constexpr span<element_type, _Count> first() const noexcept


        


More information about the libcxx-commits mailing list