[libcxx-commits] [PATCH] D101730: [libcxx] deprecates/removes `std::raw_storage_iterator`

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun May 2 17:05:58 PDT 2021


Quuxplusone added a comment.

LGTM % comments.



================
Comment at: libcxx/include/__memory/raw_storage_iterator.h:28
 
+#if _LIBCPP_STD_VER <= 17
 template <class _OutputIterator, class _Tp>
----------------
Insert a blank line between lines 28 and 29. (Or, remove line 55; but I think for a chunk of code this long, "insert" is the right answer.)


================
Comment at: libcxx/test/std/utilities/memory/storage.iterator/deprecated.verify.cpp:9
+
+// UNSUPPORTED: c++03, c++11, c++14, c++20, c++2b
+
----------------
`REQUIRES: c++17`


================
Comment at: libcxx/test/std/utilities/memory/storage.iterator/deprecated.verify.cpp:17-28
+struct A {
+  explicit A(int i);
+  bool operator==(int i) const;
+  A* operator&() = delete;
+};
+
+void f() {
----------------
I don't even think you use `struct A`?
Replace these 12 lines with one line:
```
std::raw_storage_iterator<int*, int> it; // expected-warning {{deprecated}}
```


================
Comment at: libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp:13-14
 
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
----------------
```
#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101730/new/

https://reviews.llvm.org/D101730



More information about the libcxx-commits mailing list