diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-01-30 00:15:47 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-01-30 00:15:47 +0000 |
commit | a902e7aa941d5a82a44f11a42e4210812cf92d13 (patch) | |
tree | 58a7066fd961123b3e77c9053e0b2f5781d40bcb /libcxx/include/experimental/filesystem | |
parent | 3b7e823f9222bf9f2c78841694c1957725f8d3ff (diff) | |
download | bcm5719-llvm-a902e7aa941d5a82a44f11a42e4210812cf92d13.tar.gz bcm5719-llvm-a902e7aa941d5a82a44f11a42e4210812cf92d13.zip |
experimental: tolerate the existence of a `__deref` macro
Microsoft's SAL has a `__deref` macro which results in a compilation
failure when building the filesystem module on Windows. Rename the
member function internally to avoid the conflict.
llvm-svn: 293449
Diffstat (limited to 'libcxx/include/experimental/filesystem')
-rw-r--r-- | libcxx/include/experimental/filesystem | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libcxx/include/experimental/filesystem b/libcxx/include/experimental/filesystem index f934f7bf5b0..011218b7015 100644 --- a/libcxx/include/experimental/filesystem +++ b/libcxx/include/experimental/filesystem @@ -1924,7 +1924,7 @@ public: const directory_entry& operator*() const { _LIBCPP_ASSERT(__imp_, "The end iterator cannot be dereferenced"); - return __deref(); + return __dereference(); } const directory_entry* operator->() const @@ -1949,11 +1949,14 @@ private: // construct the dir_stream _LIBCPP_FUNC_VIS - directory_iterator(const path&, error_code *, directory_options = directory_options::none); + directory_iterator(const path&, error_code *, + directory_options = directory_options::none); + _LIBCPP_FUNC_VIS directory_iterator& __increment(error_code * __ec = nullptr); + _LIBCPP_FUNC_VIS - const directory_entry& __deref() const; + const directory_entry& __dereference() const; private: shared_ptr<__dir_stream> __imp_; @@ -2036,11 +2039,11 @@ public: _LIBCPP_INLINE_VISIBILITY const directory_entry& operator*() const - { return __deref(); } + { return __dereference(); } _LIBCPP_INLINE_VISIBILITY const directory_entry* operator->() const - { return &__deref(); } + { return &__dereference(); } recursive_directory_iterator& operator++() { return __increment(); } @@ -2079,7 +2082,7 @@ private: error_code *__ec); _LIBCPP_FUNC_VIS - const directory_entry& __deref() const; + const directory_entry& __dereference() const; _LIBCPP_FUNC_VIS bool __try_recursion(error_code* __ec); |