a219139e98
This implements my P2467R0 proposal to support opening an fstream in exclusive mode. The new constant is also supported pre-C++23 as std::ios_base::__noreplace. This proposal hasn't been approved for C++23 yet, but I am confident it will be, as this is restoring a feture found in pre-ISO C++ iostreams implementations (and still present in the MSVC library as _Noreplace). If the proposal fails for C++23 we can remove the ios::noreplace name and just keep ios::__noreplace as an extension. libstdc++-v3/ChangeLog: PR libstdc++/59769 * config/io/basic_file_stdio.cc (fopen_mode): Add support for exclusive mode. * include/bits/ios_base.h (_S_noreplace): Define new enumerator. (ios_base::__noreplace): Define. (ios_base::noreplace): Define for C++23. * include/std/version (__cpp_lib_ios_noreplace): Define. * testsuite/27_io/basic_ofstream/open/char/noreplace.cc: New test. * testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc: New test. |
||
---|---|---|
.. | ||
algorithm | ||
any | ||
array | ||
atomic | ||
barrier | ||
bit | ||
bitset | ||
charconv | ||
chrono | ||
codecvt | ||
complex | ||
concepts | ||
condition_variable | ||
coroutine | ||
deque | ||
execution | ||
filesystem | ||
forward_list | ||
fstream | ||
functional | ||
future | ||
iomanip | ||
ios | ||
iosfwd | ||
iostream | ||
istream | ||
iterator | ||
latch | ||
limits | ||
list | ||
locale | ||
map | ||
memory | ||
memory_resource | ||
mutex | ||
numbers | ||
numeric | ||
optional | ||
ostream | ||
queue | ||
random | ||
ranges | ||
ratio | ||
regex | ||
scoped_allocator | ||
semaphore | ||
set | ||
shared_mutex | ||
source_location | ||
span | ||
spanstream | ||
sstream | ||
stack | ||
stdexcept | ||
stop_token | ||
streambuf | ||
string | ||
string_view | ||
syncstream | ||
system_error | ||
thread | ||
tuple | ||
type_traits | ||
typeindex | ||
unordered_map | ||
unordered_set | ||
utility | ||
valarray | ||
variant | ||
vector | ||
version |