[libcxx-commits] [PATCH] D137640: [libcxx] Implement P2467R1: Support exclusive mode for fstreams

Twice via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 9 23:26:38 PST 2022


PragmaTwice updated this revision to Diff 474452.
PragmaTwice added a comment.

replace defined(__cpp_lib_ios_noreplace) with _LIBCPP_STD_VER >= 23


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137640

Files:
  libcxx/include/fstream
  libcxx/include/ios


Index: libcxx/include/ios
===================================================================
--- libcxx/include/ios
+++ libcxx/include/ios
@@ -277,7 +277,7 @@
     static const openmode ate    = 0x02;
     static const openmode binary = 0x04;
     static const openmode in     = 0x08;
-#if defined(__cpp_lib_ios_noreplace)
+#if _LIBCPP_STD_VER >= 23
     static const openmode noreplace = 0x40;
 #endif
     static const openmode out   = 0x10;
Index: libcxx/include/fstream
===================================================================
--- libcxx/include/fstream
+++ libcxx/include/fstream
@@ -554,7 +554,7 @@
   case ios_base::in | ios_base::out | ios_base::app | ios_base::binary:
   case ios_base::in | ios_base::app | ios_base::binary:
     return "a+b" _LIBCPP_FOPEN_CLOEXEC_MODE;
-#if defined(__cpp_lib_ios_noreplace)
+#if _LIBCPP_STD_VER >= 23
   case ios_base::out | ios_base::noreplace:
   case ios_base::out | ios_base::trunc | ios_base::noreplace:
     return "wx" _LIBCPP_FOPEN_CLOEXEC_MODE;
@@ -679,7 +679,7 @@
         case ios_base::in | ios_base::app | ios_base::binary:
             __mdstr = L"a+b";
             break;
-#  if defined(__cpp_lib_ios_noreplace)
+#  if _LIBCPP_STD_VER >= 23
         case ios_base::out | ios_base::noreplace:
         case ios_base::out | ios_base::trunc | ios_base::noreplace:
           __mdstr = L"wx";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137640.474452.patch
Type: text/x-patch
Size: 1362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221110/a82d75c6/attachment-0001.bin>


More information about the libcxx-commits mailing list