This is the mail archive of the libstdc++-cvs@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]

r228042 - in /trunk/libstdc++-v3: ChangeLog aci...


Author: redi
Date: Wed Sep 23 11:26:45 2015
New Revision: 228042

URL: https://gcc.gnu.org/viewcvs?rev=228042&root=gcc&view=rev
Log:
Fix semantics of Filesystem TS directory iterators

[class.directory_iterator] p4 and [directory_iterator.members] p4
require that only the default constructor and ignored permission denied
errors can create the end iterator.

	* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Remove _GLIBCXX_
	prefix from HAVE_STRUCT_DIRENT_D_TYPE.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/experimental/fs_dir.h (operator==, operator==):
	Use owner_before instead of pointer equality.
	(directory_iterator(std::shared_ptr<_Dir>, error_code*)): Remove.
	* src/filesystem/dir.cc (ErrorCode): Remove.
	(_Dir::advance): Change ErrorCode parameter to error_code*, add
	directory_options parameter and check it on error.
	(opendir): Rename to open_dir to avoid clashing with macro. Change
	ErrorCode parameter to error_code*.
	(make_shared_dir): Remove.
	(native_readdir) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Don't set errno.
	(directory_iterator(std::shared_ptr<_Dir>, error_code*)): Remove.
	(directory_iterator(const path&, directory_options, error_code*)):
	Pass options to _Dir::advance and create non-end iterator on error.
	(recursive_directory_iterator(const path&, directory_options,
	error_code*)): Clear error_code on ignored error, create non-end
	iterator otherwise.
	(recursive_directory_iterator::increment): Pass _M_options to
	_Dir::advance.
	(recursive_directory_iterator::pop): Likewise.
	* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
	New.
	* testsuite/experimental/filesystem/iterators/
	recursive_directory_iterator.cc: New.

Added:
    trunk/libstdc++-v3/testsuite/experimental/filesystem/iterators/
    trunk/libstdc++-v3/testsuite/experimental/filesystem/iterators/directory_iterator.cc
    trunk/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/acinclude.m4
    trunk/libstdc++-v3/config.h.in
    trunk/libstdc++-v3/configure
    trunk/libstdc++-v3/include/experimental/fs_dir.h
    trunk/libstdc++-v3/src/filesystem/dir.cc


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