[libc-commits] [PATCH] D156629: [libc] Quiet initializer warnings in getopt
Roland McGrath via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jul 31 16:51:00 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0ed4b17707aa: [libc] Quiet initializer warnings in getopt (authored by mcgrathr).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156629/new/
https://reviews.llvm.org/D156629
Files:
libc/src/unistd/getopt.cpp
Index: libc/src/unistd/getopt.cpp
===================================================================
--- libc/src/unistd/getopt.cpp
+++ libc/src/unistd/getopt.cpp
@@ -22,6 +22,9 @@
namespace __llvm_libc {
template <typename T> struct RefWrapper {
+ RefWrapper() = delete;
+ constexpr RefWrapper(T *p) : ptr{p} {}
+ constexpr RefWrapper(const RefWrapper &) = default;
RefWrapper &operator=(const RefWrapper &) = default;
operator T &() { return *ptr; }
T &get() { return *ptr; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156629.545866.patch
Type: text/x-patch
Size: 495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230731/8012c49d/attachment.bin>
More information about the libc-commits
mailing list