summaryrefslogtreecommitdiffstats
path: root/libcxx/include/experimental/filesystem
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-21 22:11:16 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-21 22:11:16 +0000
commit310d3b975fd07bba9ac45fb1f05f6c951cb16ad7 (patch)
treef6467f371c37ab215eda731f4772c1d419392eaa /libcxx/include/experimental/filesystem
parent606a338db9c3cc1fc446111e1d11193f93ba1c5b (diff)
downloadbcm5719-llvm-310d3b975fd07bba9ac45fb1f05f6c951cb16ad7.tar.gz
bcm5719-llvm-310d3b975fd07bba9ac45fb1f05f6c951cb16ad7.zip
Implement LWG issue 2725. The issue should move this meeting
llvm-svn: 273325
Diffstat (limited to 'libcxx/include/experimental/filesystem')
-rw-r--r--libcxx/include/experimental/filesystem4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/include/experimental/filesystem b/libcxx/include/experimental/filesystem
index a667c739521..be7d23faee6 100644
--- a/libcxx/include/experimental/filesystem
+++ b/libcxx/include/experimental/filesystem
@@ -1393,7 +1393,9 @@ bool exists(const path& __p) {
inline _LIBCPP_INLINE_VISIBILITY
bool exists(const path& __p, error_code& __ec) _NOEXCEPT {
- return exists(__status(__p, &__ec));
+ auto __s = __status(__p, &__ec);
+ if (status_known(__s)) __ec.clear();
+ return exists(__s);
}
inline _LIBCPP_INLINE_VISIBILITY
OpenPOWER on IntegriCloud