gcc/libstdc++-v3/include/bits
Jonathan Wakely f7a148304a libstdc++: Add nodiscard attribute to filesystem operations
Some of these are not truly "pure" because they access the file system,
e.g. exists and file_size, but they do not modify anything and are only
useful for the return value.

If you really want to use one of those functions just to check whether
an error is reported (either via an exception or an error_code&
argument) you can still do so, but you need to cast the discarded result
to void.  Several tests need such a change, because they were indeed
only calling the functions to check for expected errors.

libstdc++-v3/ChangeLog:

	* include/bits/fs_ops.h: Add nodiscard to all pure functions.
	* include/experimental/bits/fs_ops.h: Likewise.
	* testsuite/27_io/filesystem/operations/all.cc: Do not discard
	results of absolute and canonical.
	* testsuite/27_io/filesystem/operations/absolute.cc: Cast
	discarded result to void.
	* testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
	* testsuite/27_io/filesystem/operations/exists.cc: Likewise.
	* testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
	* testsuite/27_io/filesystem/operations/read_symlink.cc:
	Likewise.
	* testsuite/27_io/filesystem/operations/status.cc: Likewise.
	* testsuite/27_io/filesystem/operations/symlink_status.cc:
	Likewise.
	* testsuite/27_io/filesystem/operations/temp_directory_path.cc:
	Likewise.
	* testsuite/experimental/filesystem/operations/canonical.cc:
	Likewise.
	* testsuite/experimental/filesystem/operations/exists.cc:
	Likewise.
	* testsuite/experimental/filesystem/operations/is_empty.cc:
	Likewise.
	* testsuite/experimental/filesystem/operations/read_symlink.cc:
	Likewise.
	* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
	Likewise.
2022-07-01 11:50:18 +01:00
..
algorithmfwd.h libstdc++: Add macros for the inline namespace std::_V2 2022-05-13 13:32:22 +01:00
align.h
alloc_traits.h libstdc++: Improve doxygen docs for std::allocator 2022-05-13 13:32:22 +01:00
allocated_ptr.h
allocator.h libstdc++: Check for size overflow in constexpr allocation [PR105957] 2022-06-14 21:07:47 +01:00
atomic_base.h libstdc++: Improve doxygen docs for <atomic> 2022-05-13 13:32:22 +01:00
atomic_futex.h
atomic_timed_wait.h
atomic_wait.h
basic_ios.h
basic_ios.tcc
basic_string.h libstdc++: Support constexpr global std::string for size < 15 [PR105995] 2022-06-16 20:20:40 +01:00
basic_string.tcc libstdc++: Inline all basic_string::compare overloads [PR59048] 2022-06-14 21:07:47 +01:00
boost_concept_check.h
c++0x_warning.h
c++config libstdc++: Improve doxygen docs for <regex> 2022-05-13 13:32:22 +01:00
char_traits.h libstdc++: Avoid including <cstdint> for std::char_traits 2022-05-19 23:39:21 +01:00
charconv.h
chrono.h libstdc++: Invert relationship between std::is_clock and std::is_clock_v 2022-06-27 11:08:16 +01:00
codecvt.h
concept_check.h
cow_string.h libstdc++: Inline all basic_string::compare overloads [PR59048] 2022-06-14 21:07:47 +01:00
cpp_type_traits.h
deque.tcc
enable_special_members.h
erase_if.h
forward_list.h
forward_list.tcc
fs_dir.h
fs_fwd.h
fs_ops.h libstdc++: Add nodiscard attribute to filesystem operations 2022-07-01 11:50:18 +01:00
fs_path.h libstdc++: Simplify fs::path construction using variable template 2022-06-27 11:08:16 +01:00
fstream.tcc
functexcept.h
functional_hash.h libstdc++: Refactor includes for unordered containers 2022-05-26 10:44:45 +01:00
gslice_array.h
gslice.h
hashtable_policy.h libstdc++: [_Hashtable] Insert range of types convertible to value_type PR 105717 2022-06-15 20:21:52 +02:00
hashtable.h libstdc++: [_Hashtable] Insert range of types convertible to value_type PR 105717 2022-06-15 20:21:52 +02:00
indirect_array.h
invoke.h
ios_base.h libstdc++: Add attributes to <system_error> and related 2022-05-17 20:50:31 +01:00
istream.tcc
iterator_concepts.h
list.tcc
locale_classes.h
locale_classes.tcc
locale_conv.h
locale_facets_nonio.h libstdc++: Remove whitespace before preprocessor directives 2022-05-12 18:04:01 +01:00
locale_facets_nonio.tcc
locale_facets.h
locale_facets.tcc
localefwd.h
mask_array.h
max_size_type.h
memory_resource.h libstdc++: Ensure pmr aliases work without <memory_resource> 2022-05-19 23:38:23 +01:00
memoryfwd.h
mofunc_impl.h libstdc++: Fix typo in doxygen @headerfile command 2022-05-13 13:32:21 +01:00
move_only_function.h libstdc++: Make std::move_only_function never valueless in std::variant 2022-06-27 11:08:16 +01:00
move.h
new_allocator.h libstdc++: Fix indentation in allocator base classes 2022-06-14 21:07:47 +01:00
node_handle.h
ostream_insert.h libstdc++: Improve doxygen docs for algorithms and more 2022-05-13 13:32:22 +01:00
ostream.tcc
parse_numbers.h
postypes.h
predefined_ops.h
ptr_traits.h libstdc++: Improve doxygen docs for std::pointer_traits 2022-05-13 13:32:22 +01:00
quoted_string.h
random.h
random.tcc libstdc++: Simplify std::normal_distribution equality operator 2022-05-06 23:54:09 +01:00
range_access.h
ranges_algo.h
ranges_algobase.h libstdc++: Remove some unnecessary includes 2022-05-26 10:44:45 +01:00
ranges_base.h
ranges_cmp.h
ranges_uninitialized.h
ranges_util.h
refwrap.h
regex_automaton.h
regex_automaton.tcc
regex_compiler.h
regex_compiler.tcc
regex_constants.h libstdc++: Improve doxygen docs for <regex> 2022-05-13 13:32:22 +01:00
regex_error.h libstdc++: Improve doxygen docs for <regex> 2022-05-13 13:32:22 +01:00
regex_executor.h
regex_executor.tcc
regex_scanner.h
regex_scanner.tcc
regex.h libstdc++: Improve doxygen docs for <regex> 2022-05-13 13:32:22 +01:00
regex.tcc
semaphore_base.h
shared_ptr_atomic.h libstdc++: Improve doxygen docs for <atomic> 2022-05-13 13:32:22 +01:00
shared_ptr_base.h
shared_ptr.h
slice_array.h
specfun.h
sstream.tcc
std_abs.h
std_function.h
std_mutex.h libstdc++: Improve doxygen docs for <mutex> 2022-05-13 13:32:23 +01:00
std_thread.h libstdc++: Make std:🧵:_State private 2022-05-13 20:40:05 +01:00
stl_algo.h libstdc++: Improve doxygen docs for algorithms and more 2022-05-13 13:32:22 +01:00
stl_algobase.h
stl_bvector.h
stl_construct.h
stl_deque.h
stl_function.h
stl_heap.h libstdc++: Make headers include their prerequisites 2022-05-26 10:44:45 +01:00
stl_iterator_base_funcs.h libstdc++: Make headers include their prerequisites 2022-05-26 10:44:45 +01:00
stl_iterator_base_types.h
stl_iterator.h libstdc++: Add constexpr to std::counted_iterator post-increment (LWG 3643) 2022-05-26 17:14:40 +01:00
stl_list.h
stl_map.h
stl_multimap.h
stl_multiset.h
stl_numeric.h libstdc++: Improve doxygen docs for algorithms and more 2022-05-13 13:32:22 +01:00
stl_pair.h libstdc++: Improve doxygen docs for algorithms and more 2022-05-13 13:32:22 +01:00
stl_queue.h
stl_raw_storage_iter.h
stl_relops.h
stl_set.h
stl_stack.h
stl_tempbuf.h
stl_tree.h
stl_uninitialized.h
stl_vector.h
stream_iterator.h
streambuf_iterator.h
streambuf.tcc
string_view.tcc
stringfwd.h
this_thread_sleep.h
uniform_int_dist.h
unique_lock.h libstdc++: Improve doxygen docs for <mutex> 2022-05-13 13:32:23 +01:00
unique_ptr.h libstdc++: Improve doxygen docs for some of <memory> 2022-05-13 13:32:23 +01:00
unordered_map.h libstdc++: Refactor includes for unordered containers 2022-05-26 10:44:45 +01:00
unordered_set.h libstdc++: Refactor includes for unordered containers 2022-05-26 10:44:45 +01:00
uses_allocator_args.h
uses_allocator.h
utility.h libstdc++: Fix comment typos 2022-06-30 16:11:57 +01:00
valarray_after.h
valarray_array.h
valarray_array.tcc
valarray_before.h
vector.tcc