filesystem: return the constructed object
This really should get identified properly by the compiler to convert to a NVRO, but compress the code anyways. This makes the implementation identical to directory_iterator.cpp git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -35,12 +35,9 @@ namespace detail { namespace {
|
||||
using value_type = path::value_type;
|
||||
using string_type = path::string_type;
|
||||
|
||||
|
||||
|
||||
inline std::error_code capture_errno() {
|
||||
_LIBCPP_ASSERT(errno, "Expected errno to be non-zero");
|
||||
std::error_code m_ec(errno, std::generic_category());
|
||||
return m_ec;
|
||||
_LIBCPP_ASSERT(errno, "Expected errno to be non-zero");
|
||||
return std::error_code(errno, std::generic_category());
|
||||
}
|
||||
|
||||
void set_or_throw(std::error_code const& m_ec, std::error_code* ec,
|
||||
|
||||
Reference in New Issue
Block a user