Commit 71101282 by Jonathan Wakely Committed by Jonathan Wakely

Remove incorrect assertion from filesystem::absolute

The assertion is wrong, it should be *s.end() == 0, but that's not
allowed. Just remove it, but keep the comment.

	* src/c++17/fs_ops.cc (absolute(const path&, error_code&))
	[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.

From-SVN: r271300
parent afc819e8
2019-05-16 Jonathan Wakely <jwakely@redhat.com>
* src/c++17/fs_ops.cc (absolute(const path&, error_code&))
[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
* include/std/variant (__overload_set): Remove.
(_Arr): New helper.
(_Build_FUN): New class template to define a single FUN overload,
......
......@@ -96,6 +96,7 @@ fs::absolute(const path& p, error_code& ec)
}
#ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS
// s must remain null-terminated
wstring_view s = p.native();
if (p.has_root_directory()) // implies !p.has_root_name()
......@@ -108,9 +109,6 @@ fs::absolute(const path& p, error_code& ec)
s.remove_prefix(std::min(s.length(), pos) - 1);
}
// s must be null-terminated
__glibcxx_assert(!s.empty() && s.back() == 0);
uint32_t len = 1024;
wstring buf;
do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment