This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add noexcept to filesystem::path query functions


In the standard these member functions are specified in terms of the
potentially-throwing path decompositions functions, but we implement
them without constructing any new paths or doing anything else that can
throw.

	PR libstdc++/71044
	* include/bits/fs_path.h (path::has_root_name)
	(path::has_root_directory, path::has_root_path)
	(path::has_relative_path, path::has_parent_path)
	(path::has_filename, path::has_stem, path::has_extension)
	(path::is_absolute, path::is_relative, path::_M_find_extension): Add
	noexcept.
	* src/c++17/fs_path.cc (path::has_root_name)
	(path::has_root_directory, path::has_root_path)
	(path::has_relative_path, path::has_parent_path)
	(path::has_filename, path::_M_find_extension): Add noexcept.

Tested powerpc64le-linux, committed to trunk.

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]