Index: docs/DesignDocs/VisibilityMacros.rst =================================================================== --- docs/DesignDocs/VisibilityMacros.rst +++ docs/DesignDocs/VisibilityMacros.rst @@ -155,6 +155,15 @@ versioning namespace. This allows throwing and catching some exception types between libc++ and libstdc++. +Experimental Library +==================== + +The libc++experimental library provides special visibility macros which are +prefixed with _LIBCPPX instead of _LIBCPP. libc++experimental is always built +as a static library, so there may be some visibility changes needed. +Currently this only makes a difference on Windows, where experimental API won't +be marked with dllexport/dllimport. + Links ===== Index: include/experimental/__config =================================================================== --- include/experimental/__config +++ include/experimental/__config @@ -54,4 +54,30 @@ #define _VSTD_FS ::std::experimental::filesystem::v1 +#if defined(_LIBCPP_OBJECT_FORMAT_COFF) +# define _LIBCPPX_TYPE_VIS +# define _LIBCPPX_FUNC_VIS +# define _LIBCPPX_TEMPLATE_VIS +# define _LIBCPPX_EXTERN_TEMPLATE_TYPE_VIS +# define _LIBCPPX_CLASS_TEMPLATE_INSTANTIATION_VIS +# define _LIBCPPX_ENUM_VIS +# define _LIBCPPX_EXTERN_VIS +# define _LIBCPPX_EXCEPTION_ABI +#else +# define _LIBCPPX_TYPE_VIS _LIBCPP_TYPE_VIS +# define _LIBCPPX_FUNC_VIS _LIBCPP_FUNC_VIS +# define _LIBCPPX_TEMPLATE_VIS _LIBCPP_TEMPLATE_VIS +# define _LIBCPPX_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS +# define _LIBCPPX_CLASS_TEMPLATE_INSTANTIATION_VIS _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS +# define _LIBCPPX_ENUM_VIS _LIBCPP_ENUM_VIS +# define _LIBCPPX_EXTERN_VIS _LIBCPP_EXTERN_VIS +# define _LIBCPPX_EXCEPTION_ABI _LIBCPP_EXCEPTION_ABI +#endif // _LIBCPP_OBJECT_FORMAT_COFF +#define _LIBCPPX_HIDDEN _LIBCPP_HIDDEN +#define _LIBCPPX_OVERRIDABLE_FUNC_VIS _LIBCPP_OVERRIDABLE_FUNC_VIS +#define _LIBCPPX_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY +#define _LIBCPPX_ALWAYS_INLINE _LIBCPP_ALWAYS_INLINE +#define _LIBCPPX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS +#define _LIBCPPX_EXTERN_TEMPLATE_INLINE_VISIBILITY _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY + #endif Index: include/experimental/__memory =================================================================== --- include/experimental/__memory +++ include/experimental/__memory @@ -75,7 +75,7 @@ {}; template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void __lfts_user_alloc_construct( _Tp * __store, const _Alloc & __a, _Args &&... __args) { Index: include/experimental/algorithm =================================================================== --- include/experimental/algorithm +++ include/experimental/algorithm @@ -52,7 +52,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s) { return __s(__f, __l).first; } @@ -59,7 +59,7 @@ template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY _SampleIterator sample(_PopulationIterator __first, _PopulationIterator __last, _SampleIterator __output, _Distance __n, _UniformRandomNumberGenerator &&__g) { Index: include/experimental/any =================================================================== --- include/experimental/any +++ include/experimental/any @@ -89,7 +89,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS -class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast +class _LIBCPPX_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast { public: virtual const char* what() const _NOEXCEPT; @@ -97,7 +97,7 @@ #if _LIBCPP_STD_VER > 11 // C++ > 11 -_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE +_LIBCPP_NORETURN inline _LIBCPPX_ALWAYS_INLINE _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST void __throw_bad_any_cast() { @@ -113,12 +113,12 @@ template typename add_pointer::type>::type -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY any_cast(any const *) _NOEXCEPT; template typename add_pointer<_ValueType>::type -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY any_cast(any *) _NOEXCEPT; namespace __any_imp @@ -168,16 +168,16 @@ { public: // 6.3.1 any construct/destruct - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY any() _NOEXCEPT : __h(nullptr) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY any(any const & __other) : __h(nullptr) { if (__other.__h) __other.__call(_Action::_Copy, this); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY any(any && __other) _NOEXCEPT : __h(nullptr) { if (__other.__h) __other.__call(_Action::_Move, this); @@ -187,10 +187,10 @@ class _ValueType , class = __any_imp::_EnableIfNotAny<_ValueType> > - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY any(_ValueType && __value); - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY ~any() { this->clear(); @@ -197,7 +197,7 @@ } // 6.3.2 any assignments - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY any & operator=(any const & __rhs) { any(__rhs).swap(*this); @@ -204,7 +204,7 @@ return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY any & operator=(any && __rhs) _NOEXCEPT { any(_VSTD::move(__rhs)).swap(*this); @@ -215,21 +215,21 @@ class _ValueType , class = __any_imp::_EnableIfNotAny<_ValueType> > - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY any & operator=(_ValueType && __rhs); // 6.3.3 any modifiers - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void clear() _NOEXCEPT { if (__h) this->__call(_Action::_Destroy); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void swap(any & __rhs) _NOEXCEPT; // 6.3.4 any observers - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY bool empty() const _NOEXCEPT { return __h == nullptr; @@ -236,7 +236,7 @@ } #if !defined(_LIBCPP_NO_RTTI) - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const type_info & type() const _NOEXCEPT { if (__h) { @@ -258,7 +258,7 @@ __any_imp::_Buffer __buf; }; - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void * __call(_Action __a, any * __other = nullptr, type_info const * __info = nullptr) const { @@ -265,7 +265,7 @@ return __h(__a, this, __other, __info); } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void * __call(_Action __a, any * __other = nullptr, type_info const * __info = nullptr) { @@ -293,9 +293,9 @@ { template - struct _LIBCPP_TEMPLATE_VIS _SmallHandler + struct _LIBCPPX_TEMPLATE_VIS _SmallHandler { - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY static void* __handle(_Action __act, any const * __this, any * __other, type_info const * __info) { @@ -318,7 +318,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY static void __create(any & __dest, _Up && __v) { ::new (static_cast(&__dest.__s.__buf)) _Tp(_VSTD::forward<_Up>(__v)); @@ -326,7 +326,7 @@ } private: - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_ALWAYS_INLINE _LIBCPPX_INLINE_VISIBILITY static void __destroy(any & __this) { _Tp & __value = *static_cast<_Tp *>(static_cast(&__this.__s.__buf)); @@ -334,7 +334,7 @@ __this.__h = nullptr; } - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_ALWAYS_INLINE _LIBCPPX_INLINE_VISIBILITY static void __copy(any const & __this, any & __dest) { _SmallHandler::__create(__dest, *static_cast<_Tp const *>( @@ -341,7 +341,7 @@ static_cast(&__this.__s.__buf))); } - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_ALWAYS_INLINE _LIBCPPX_INLINE_VISIBILITY static void __move(any & __this, any & __dest) { _SmallHandler::__create(__dest, _VSTD::move( @@ -349,7 +349,7 @@ __destroy(__this); } - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_ALWAYS_INLINE _LIBCPPX_INLINE_VISIBILITY static void* __get(any & __this, type_info const * __info) { #if !defined(_LIBCPP_NO_RTTI) @@ -362,7 +362,7 @@ #endif } - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_ALWAYS_INLINE _LIBCPPX_INLINE_VISIBILITY static void* __type_info() { #if !defined(_LIBCPP_NO_RTTI) @@ -374,9 +374,9 @@ }; template - struct _LIBCPP_TEMPLATE_VIS _LargeHandler + struct _LIBCPPX_TEMPLATE_VIS _LargeHandler { - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY static void* __handle(_Action __act, any const * __this, any * __other, type_info const * __info) { @@ -399,7 +399,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY static void __create(any & __dest, _Up && __v) { typedef allocator<_Tp> _Alloc; @@ -413,7 +413,7 @@ private: - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_ALWAYS_INLINE _LIBCPPX_INLINE_VISIBILITY static void __destroy(any & __this) { delete static_cast<_Tp*>(__this.__s.__ptr); @@ -420,13 +420,13 @@ __this.__h = nullptr; } - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_ALWAYS_INLINE _LIBCPPX_INLINE_VISIBILITY static void __copy(any const & __this, any & __dest) { _LargeHandler::__create(__dest, *static_cast<_Tp const *>(__this.__s.__ptr)); } - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_ALWAYS_INLINE _LIBCPPX_INLINE_VISIBILITY static void __move(any & __this, any & __dest) { __dest.__s.__ptr = __this.__s.__ptr; @@ -434,7 +434,7 @@ __this.__h = nullptr; } - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_ALWAYS_INLINE _LIBCPPX_INLINE_VISIBILITY static void* __get(any & __this, type_info const * __info) { #if !defined(_LIBCPP_NO_RTTI) @@ -447,7 +447,7 @@ #endif } - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_ALWAYS_INLINE _LIBCPPX_INLINE_VISIBILITY static void* __type_info() { #if !defined(_LIBCPP_NO_RTTI) @@ -500,7 +500,7 @@ // 6.4 Non-member functions -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void swap(any & __lhs, any & __rhs) _NOEXCEPT { __lhs.swap(__rhs); @@ -507,7 +507,7 @@ } template -_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any const & __v) { static_assert( @@ -523,7 +523,7 @@ } template -_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any & __v) { static_assert( @@ -538,7 +538,7 @@ } template -_LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType any_cast(any && __v) { static_assert( Index: include/experimental/coroutine =================================================================== --- include/experimental/coroutine +++ include/experimental/coroutine @@ -82,39 +82,39 @@ }; template -struct _LIBCPP_TEMPLATE_VIS coroutine_traits +struct _LIBCPPX_TEMPLATE_VIS coroutine_traits : public __coroutine_traits_sfinae<_Ret> { }; template -class _LIBCPP_TEMPLATE_VIS coroutine_handle; +class _LIBCPPX_TEMPLATE_VIS coroutine_handle; template <> -class _LIBCPP_TEMPLATE_VIS coroutine_handle { +class _LIBCPPX_TEMPLATE_VIS coroutine_handle { public: - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE _LIBCPP_CONSTEXPR coroutine_handle() _NOEXCEPT : __handle_(nullptr) {} - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE _LIBCPP_CONSTEXPR coroutine_handle(nullptr_t) _NOEXCEPT : __handle_(nullptr) {} - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE coroutine_handle& operator=(nullptr_t) _NOEXCEPT { __handle_ = nullptr; return *this; } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE _LIBCPP_CONSTEXPR void* address() const _NOEXCEPT { return __handle_; } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE _LIBCPP_CONSTEXPR explicit operator bool() const _NOEXCEPT { return __handle_; } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void operator()() { resume(); } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void resume() { _LIBCPP_ASSERT(__is_suspended(), "resume() can only be called on suspended coroutines"); @@ -123,7 +123,7 @@ __builtin_coro_resume(__handle_); } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void destroy() { _LIBCPP_ASSERT(__is_suspended(), "destroy() can only be called on suspended coroutines"); @@ -130,7 +130,7 @@ __builtin_coro_destroy(__handle_); } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE bool done() const { _LIBCPP_ASSERT(__is_suspended(), "done() can only be called on suspended coroutines"); @@ -138,7 +138,7 @@ } public: - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE static coroutine_handle from_address(void* __addr) _NOEXCEPT { coroutine_handle __tmp; __tmp.__handle_ = __addr; @@ -146,7 +146,7 @@ } // FIXME: Should from_address(nullptr) be allowed? - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE static coroutine_handle from_address(nullptr_t) _NOEXCEPT { return coroutine_handle(nullptr); } @@ -169,33 +169,33 @@ }; // 18.11.2.7 comparison operators: -inline _LIBCPP_ALWAYS_INLINE +inline _LIBCPPX_ALWAYS_INLINE bool operator==(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { return __x.address() == __y.address(); } -inline _LIBCPP_ALWAYS_INLINE +inline _LIBCPPX_ALWAYS_INLINE bool operator!=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { return !(__x == __y); } -inline _LIBCPP_ALWAYS_INLINE +inline _LIBCPPX_ALWAYS_INLINE bool operator<(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { return less()(__x.address(), __y.address()); } -inline _LIBCPP_ALWAYS_INLINE +inline _LIBCPPX_ALWAYS_INLINE bool operator>(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { return __y < __x; } -inline _LIBCPP_ALWAYS_INLINE +inline _LIBCPPX_ALWAYS_INLINE bool operator<=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { return !(__x > __y); } -inline _LIBCPP_ALWAYS_INLINE +inline _LIBCPPX_ALWAYS_INLINE bool operator>=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT { return !(__x < __y); } template -class _LIBCPP_TEMPLATE_VIS coroutine_handle : public coroutine_handle<> { +class _LIBCPPX_TEMPLATE_VIS coroutine_handle : public coroutine_handle<> { using _Base = coroutine_handle<>; public: #ifndef _LIBCPP_CXX03_LANG @@ -202,16 +202,16 @@ // 18.11.2.1 construct/reset using coroutine_handle<>::coroutine_handle; #else - _LIBCPP_ALWAYS_INLINE coroutine_handle() _NOEXCEPT : _Base() {} - _LIBCPP_ALWAYS_INLINE coroutine_handle(nullptr_t) _NOEXCEPT : _Base(nullptr) {} + _LIBCPPX_ALWAYS_INLINE coroutine_handle() _NOEXCEPT : _Base() {} + _LIBCPPX_ALWAYS_INLINE coroutine_handle(nullptr_t) _NOEXCEPT : _Base(nullptr) {} #endif - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY coroutine_handle& operator=(nullptr_t) _NOEXCEPT { _Base::operator=(nullptr); return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY _Promise& promise() const { return *reinterpret_cast<_Promise*>( __builtin_coro_promise(this->__handle_, __alignof(_Promise), false)); @@ -218,7 +218,7 @@ } public: - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE static coroutine_handle from_address(void* __addr) _NOEXCEPT { coroutine_handle __tmp; __tmp.__handle_ = __addr; @@ -229,7 +229,7 @@ // the deleted _Promise* overload doesn't make from_address(nullptr) // ambiguous. // FIXME: should from_address work with nullptr? - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE static coroutine_handle from_address(nullptr_t) _NOEXCEPT { return coroutine_handle(nullptr); } @@ -248,7 +248,7 @@ "pointers to the coroutine's promise type; use 'from_promise' instead"); } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE static coroutine_handle from_promise(_Promise& __promise) _NOEXCEPT { typedef typename remove_cv<_Promise>::type _RawPromise; coroutine_handle __tmp; @@ -259,21 +259,21 @@ } }; -struct _LIBCPP_TYPE_VIS suspend_never { - _LIBCPP_ALWAYS_INLINE +struct _LIBCPPX_TYPE_VIS suspend_never { + _LIBCPPX_ALWAYS_INLINE bool await_ready() const _NOEXCEPT { return true; } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void await_suspend(coroutine_handle<>) const _NOEXCEPT {} - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void await_resume() const _NOEXCEPT {} }; -struct _LIBCPP_TYPE_VIS suspend_always { - _LIBCPP_ALWAYS_INLINE +struct _LIBCPPX_TYPE_VIS suspend_always { + _LIBCPPX_ALWAYS_INLINE bool await_ready() const _NOEXCEPT { return false; } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void await_suspend(coroutine_handle<>) const _NOEXCEPT {} - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void await_resume() const _NOEXCEPT {} }; @@ -284,7 +284,7 @@ template struct hash<_VSTD_CORO::coroutine_handle<_Tp> > { using __arg_type = _VSTD_CORO::coroutine_handle<_Tp>; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY size_t operator()(__arg_type const& __v) const _NOEXCEPT {return hash()(__v.address());} }; Index: include/experimental/dynarray =================================================================== --- include/experimental/dynarray +++ include/experimental/dynarray @@ -96,6 +96,7 @@ #include <__config> #if _LIBCPP_STD_VER > 11 +#include #include <__functional_base> #include #include @@ -113,7 +114,7 @@ namespace std { namespace experimental { inline namespace __array_extensions_v1 { template -struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_DYNARRAY dynarray +struct _LIBCPPX_TEMPLATE_VIS _LIBCPP_AVAILABILITY_DYNARRAY dynarray { public: // types: @@ -133,9 +134,9 @@ private: size_t __size_; value_type * __base_; - _LIBCPP_ALWAYS_INLINE dynarray () noexcept : __size_(0), __base_(nullptr) {} + _LIBCPPX_ALWAYS_INLINE dynarray () noexcept : __size_(0), __base_(nullptr) {} - static inline _LIBCPP_INLINE_VISIBILITY value_type* __allocate ( size_t count ) + static inline _LIBCPPX_INLINE_VISIBILITY value_type* __allocate ( size_t count ) { if ( numeric_limits::max() / sizeof (value_type) <= count ) __throw_bad_array_length(); @@ -143,7 +144,7 @@ return static_cast (_VSTD::__allocate (sizeof(value_type) * count)); } - static inline _LIBCPP_INLINE_VISIBILITY void __deallocate_value( value_type* __ptr ) noexcept + static inline _LIBCPPX_INLINE_VISIBILITY void __deallocate_value( value_type* __ptr ) noexcept { _VSTD::__libcpp_deallocate (static_cast (__ptr)); } @@ -150,13 +151,13 @@ public: - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY explicit dynarray(size_type __c); - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY dynarray(size_type __c, const value_type& __v); - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY dynarray(const dynarray& __d); - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY dynarray(initializer_list); // We're not implementing these right now. @@ -171,47 +172,47 @@ // dynarray(allocator_arg_t, const _Alloc& __alloc, initializer_list); dynarray& operator=(const dynarray&) = delete; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY ~dynarray(); // iterators: - inline _LIBCPP_INLINE_VISIBILITY iterator begin() noexcept { return iterator(data()); } - inline _LIBCPP_INLINE_VISIBILITY const_iterator begin() const noexcept { return const_iterator(data()); } - inline _LIBCPP_INLINE_VISIBILITY const_iterator cbegin() const noexcept { return const_iterator(data()); } - inline _LIBCPP_INLINE_VISIBILITY iterator end() noexcept { return iterator(data() + __size_); } - inline _LIBCPP_INLINE_VISIBILITY const_iterator end() const noexcept { return const_iterator(data() + __size_); } - inline _LIBCPP_INLINE_VISIBILITY const_iterator cend() const noexcept { return const_iterator(data() + __size_); } + inline _LIBCPPX_INLINE_VISIBILITY iterator begin() noexcept { return iterator(data()); } + inline _LIBCPPX_INLINE_VISIBILITY const_iterator begin() const noexcept { return const_iterator(data()); } + inline _LIBCPPX_INLINE_VISIBILITY const_iterator cbegin() const noexcept { return const_iterator(data()); } + inline _LIBCPPX_INLINE_VISIBILITY iterator end() noexcept { return iterator(data() + __size_); } + inline _LIBCPPX_INLINE_VISIBILITY const_iterator end() const noexcept { return const_iterator(data() + __size_); } + inline _LIBCPPX_INLINE_VISIBILITY const_iterator cend() const noexcept { return const_iterator(data() + __size_); } - inline _LIBCPP_INLINE_VISIBILITY reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } - inline _LIBCPP_INLINE_VISIBILITY const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } - inline _LIBCPP_INLINE_VISIBILITY const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } - inline _LIBCPP_INLINE_VISIBILITY reverse_iterator rend() noexcept { return reverse_iterator(begin()); } - inline _LIBCPP_INLINE_VISIBILITY const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } - inline _LIBCPP_INLINE_VISIBILITY const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } + inline _LIBCPPX_INLINE_VISIBILITY reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } + inline _LIBCPPX_INLINE_VISIBILITY const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } + inline _LIBCPPX_INLINE_VISIBILITY const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } + inline _LIBCPPX_INLINE_VISIBILITY reverse_iterator rend() noexcept { return reverse_iterator(begin()); } + inline _LIBCPPX_INLINE_VISIBILITY const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } + inline _LIBCPPX_INLINE_VISIBILITY const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } // capacity: - inline _LIBCPP_INLINE_VISIBILITY size_type size() const noexcept { return __size_; } - inline _LIBCPP_INLINE_VISIBILITY size_type max_size() const noexcept { return __size_; } - inline _LIBCPP_INLINE_VISIBILITY bool empty() const noexcept { return __size_ == 0; } + inline _LIBCPPX_INLINE_VISIBILITY size_type size() const noexcept { return __size_; } + inline _LIBCPPX_INLINE_VISIBILITY size_type max_size() const noexcept { return __size_; } + inline _LIBCPPX_INLINE_VISIBILITY bool empty() const noexcept { return __size_ == 0; } // element access: - inline _LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n) { return data()[__n]; } - inline _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const { return data()[__n]; } + inline _LIBCPPX_INLINE_VISIBILITY reference operator[](size_type __n) { return data()[__n]; } + inline _LIBCPPX_INLINE_VISIBILITY const_reference operator[](size_type __n) const { return data()[__n]; } - inline _LIBCPP_INLINE_VISIBILITY reference front() { return data()[0]; } - inline _LIBCPP_INLINE_VISIBILITY const_reference front() const { return data()[0]; } - inline _LIBCPP_INLINE_VISIBILITY reference back() { return data()[__size_-1]; } - inline _LIBCPP_INLINE_VISIBILITY const_reference back() const { return data()[__size_-1]; } + inline _LIBCPPX_INLINE_VISIBILITY reference front() { return data()[0]; } + inline _LIBCPPX_INLINE_VISIBILITY const_reference front() const { return data()[0]; } + inline _LIBCPPX_INLINE_VISIBILITY reference back() { return data()[__size_-1]; } + inline _LIBCPPX_INLINE_VISIBILITY const_reference back() const { return data()[__size_-1]; } - inline _LIBCPP_INLINE_VISIBILITY const_reference at(size_type __n) const; - inline _LIBCPP_INLINE_VISIBILITY reference at(size_type __n); + inline _LIBCPPX_INLINE_VISIBILITY const_reference at(size_type __n) const; + inline _LIBCPPX_INLINE_VISIBILITY reference at(size_type __n); // data access: - inline _LIBCPP_INLINE_VISIBILITY _Tp* data() noexcept { return __base_; } - inline _LIBCPP_INLINE_VISIBILITY const _Tp* data() const noexcept { return __base_; } + inline _LIBCPPX_INLINE_VISIBILITY _Tp* data() noexcept { return __base_; } + inline _LIBCPPX_INLINE_VISIBILITY const _Tp* data() const noexcept { return __base_; } // mutating member functions: - inline _LIBCPP_INLINE_VISIBILITY void fill(const value_type& __v) { fill_n(begin(), __size_, __v); } + inline _LIBCPPX_INLINE_VISIBILITY void fill(const value_type& __v) { fill_n(begin(), __size_, __v); } }; template @@ -269,7 +270,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY typename dynarray<_Tp>::reference dynarray<_Tp>::at(size_type __n) { @@ -280,7 +281,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY typename dynarray<_Tp>::const_reference dynarray<_Tp>::at(size_type __n) const { @@ -295,7 +296,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> : true_type {}; +struct _LIBCPPX_TEMPLATE_VIS uses_allocator, _Alloc> : true_type {}; _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS Index: include/experimental/filesystem =================================================================== --- include/experimental/filesystem +++ include/experimental/filesystem @@ -242,7 +242,7 @@ typedef chrono::time_point file_time_type; -struct _LIBCPP_TYPE_VIS space_info +struct _LIBCPPX_TYPE_VIS space_info { uintmax_t capacity; uintmax_t free; @@ -249,7 +249,7 @@ uintmax_t available; }; -enum class _LIBCPP_ENUM_VIS file_type : signed char +enum class _LIBCPPX_ENUM_VIS file_type : signed char { none = 0, not_found = -1, @@ -263,7 +263,7 @@ unknown = 8 }; -enum class _LIBCPP_ENUM_VIS perms : unsigned +enum class _LIBCPPX_ENUM_VIS perms : unsigned { none = 0, @@ -295,35 +295,35 @@ symlink_nofollow = 0x40000 }; -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR perms operator&(perms _LHS, perms _RHS) { return static_cast(static_cast(_LHS) & static_cast(_RHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR perms operator|(perms _LHS, perms _RHS) { return static_cast(static_cast(_LHS) | static_cast(_RHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR perms operator^(perms _LHS, perms _RHS) { return static_cast(static_cast(_LHS) ^ static_cast(_RHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR perms operator~(perms _LHS) { return static_cast(~static_cast(_LHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline perms& operator&=(perms& _LHS, perms _RHS) { return _LHS = _LHS & _RHS; } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline perms& operator|=(perms& _LHS, perms _RHS) { return _LHS = _LHS | _RHS; } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline perms& operator^=(perms& _LHS, perms _RHS) { return _LHS = _LHS ^ _RHS; } -enum class _LIBCPP_ENUM_VIS copy_options : unsigned short +enum class _LIBCPPX_ENUM_VIS copy_options : unsigned short { none = 0, skip_existing = 1, @@ -338,36 +338,36 @@ __in_recursive_copy = 512, }; -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR copy_options operator&(copy_options _LHS, copy_options _RHS) { return static_cast(static_cast(_LHS) & static_cast(_RHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR copy_options operator|(copy_options _LHS, copy_options _RHS) { return static_cast(static_cast(_LHS) | static_cast(_RHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR copy_options operator^(copy_options _LHS, copy_options _RHS) { return static_cast(static_cast(_LHS) ^ static_cast(_RHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR copy_options operator~(copy_options _LHS) { return static_cast(~static_cast(_LHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline copy_options& operator&=(copy_options& _LHS, copy_options _RHS) { return _LHS = _LHS & _RHS; } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline copy_options& operator|=(copy_options& _LHS, copy_options _RHS) { return _LHS = _LHS | _RHS; } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline copy_options& operator^=(copy_options& _LHS, copy_options _RHS) { return _LHS = _LHS ^ _RHS; } -enum class _LIBCPP_ENUM_VIS directory_options : unsigned char +enum class _LIBCPPX_ENUM_VIS directory_options : unsigned char { none = 0, follow_directory_symlink = 1, @@ -374,42 +374,42 @@ skip_permission_denied = 2 }; -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR directory_options operator&(directory_options _LHS, directory_options _RHS) { return static_cast(static_cast(_LHS) & static_cast(_RHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR directory_options operator|(directory_options _LHS, directory_options _RHS) { return static_cast(static_cast(_LHS) | static_cast(_RHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR directory_options operator^(directory_options _LHS, directory_options _RHS) { return static_cast(static_cast(_LHS) ^ static_cast(_RHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR directory_options operator~(directory_options _LHS) { return static_cast(~static_cast(_LHS)); } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline directory_options& operator&=(directory_options& _LHS, directory_options _RHS) { return _LHS = _LHS & _RHS; } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline directory_options& operator|=(directory_options& _LHS, directory_options _RHS) { return _LHS = _LHS | _RHS; } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline directory_options& operator^=(directory_options& _LHS, directory_options _RHS) { return _LHS = _LHS ^ _RHS; } -class _LIBCPP_TYPE_VIS file_status +class _LIBCPPX_TYPE_VIS file_status { public: // constructors - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY file_status() _NOEXCEPT : file_status(file_type::none) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY explicit file_status(file_type __ft, perms __prms = perms::unknown) _NOEXCEPT : __ft_(__ft), __prms_(__prms) @@ -418,7 +418,7 @@ file_status(const file_status&) _NOEXCEPT = default; file_status(file_status&&) _NOEXCEPT = default; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY ~file_status() {} file_status& operator=(const file_status&) _NOEXCEPT = default; @@ -425,23 +425,23 @@ file_status& operator=(file_status&&) _NOEXCEPT = default; // observers - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE file_type type() const _NOEXCEPT { return __ft_; } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE perms permissions() const _NOEXCEPT { return __prms_; } // modifiers - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void type(file_type __ft) _NOEXCEPT { __ft_ = __ft; } - _LIBCPP_ALWAYS_INLINE + _LIBCPPX_ALWAYS_INLINE void permissions(perms __p) _NOEXCEPT { __prms_ = __p; } @@ -450,7 +450,7 @@ perms __prms_; }; -class _LIBCPP_TYPE_VIS directory_entry; +class _LIBCPPX_TYPE_VIS directory_entry; template struct __can_convert_char { static const bool value = false; @@ -658,7 +658,7 @@ }; -class _LIBCPP_TYPE_VIS path +class _LIBCPPX_TYPE_VIS path { template using _EnableIfPathable = typename @@ -677,11 +677,11 @@ static _LIBCPP_CONSTEXPR value_type preferred_separator = '/'; // constructors and destructor - _LIBCPP_INLINE_VISIBILITY path() _NOEXCEPT {} - _LIBCPP_INLINE_VISIBILITY path(const path& __p) : __pn_(__p.__pn_) {} - _LIBCPP_INLINE_VISIBILITY path(path&& __p) _NOEXCEPT : __pn_(_VSTD::move(__p.__pn_)) {} + _LIBCPPX_INLINE_VISIBILITY path() _NOEXCEPT {} + _LIBCPPX_INLINE_VISIBILITY path(const path& __p) : __pn_(__p.__pn_) {} + _LIBCPPX_INLINE_VISIBILITY path(path&& __p) _NOEXCEPT : __pn_(_VSTD::move(__p.__pn_)) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path(string_type&& __s) _NOEXCEPT : __pn_(_VSTD::move(__s)) {} template < @@ -706,17 +706,17 @@ template path(_InputIt __first, _InputIt _last, const locale& __loc); - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY ~path() = default; // assignments - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path& operator=(const path& __p) { __pn_ = __p.__pn_; return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path& operator=(path&& __p) _NOEXCEPT { __pn_ = _VSTD::move(__p.__pn_); return *this; @@ -723,13 +723,13 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path& operator=(string_type&& __s) _NOEXCEPT { __pn_ = _VSTD::move(__s); return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path& assign(string_type&& __s) _NOEXCEPT { __pn_ = _VSTD::move(__s); return *this; @@ -736,7 +736,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY _EnableIfPathable<_Source> operator=(const _Source& __src) { return this->assign(__src); } @@ -781,7 +781,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY _EnableIfPathable<_Source> operator/=(const _Source& __src) { return this->append(__src); @@ -810,31 +810,31 @@ } // concatenation - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path& operator+=(const path& __x) { __pn_ += __x.__pn_; return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path& operator+=(const string_type& __x) { __pn_ += __x; return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path& operator+=(__string_view __x) { __pn_ += __x; return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path& operator+=(const value_type* __x) { __pn_ += __x; return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path& operator+=(value_type __x) { __pn_ += __x; return *this; @@ -871,7 +871,7 @@ } // modifiers - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void clear() _NOEXCEPT { __pn_.clear(); } @@ -878,7 +878,7 @@ path& make_preferred() { return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY path& remove_filename() { if (__pn_.size() == __root_path_raw().size()) clear(); @@ -894,21 +894,21 @@ path& replace_extension(const path& __replacement = path()); - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void swap(path& __rhs) _NOEXCEPT { __pn_.swap(__rhs.__pn_); } // native format observers - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const string_type& native() const _NOEXCEPT { return __pn_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const value_type* c_str() const _NOEXCEPT { return __pn_.c_str(); } - _LIBCPP_INLINE_VISIBILITY operator string_type() const { return __pn_; } + _LIBCPPX_INLINE_VISIBILITY operator string_type() const { return __pn_; } template , class _Allocator = allocator<_ECharT> > @@ -922,11 +922,11 @@ return __s; } - _LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; } - _LIBCPP_INLINE_VISIBILITY std::wstring wstring() const { return string(); } - _LIBCPP_INLINE_VISIBILITY std::string u8string() const { return __pn_; } - _LIBCPP_INLINE_VISIBILITY std::u16string u16string() const { return string(); } - _LIBCPP_INLINE_VISIBILITY std::u32string u32string() const { return string(); } + _LIBCPPX_INLINE_VISIBILITY std::string string() const { return __pn_; } + _LIBCPPX_INLINE_VISIBILITY std::wstring wstring() const { return string(); } + _LIBCPPX_INLINE_VISIBILITY std::string u8string() const { return __pn_; } + _LIBCPPX_INLINE_VISIBILITY std::u16string u16string() const { return string(); } + _LIBCPPX_INLINE_VISIBILITY std::u32string u32string() const { return string(); } // generic format observers template , @@ -956,38 +956,38 @@ public: // compare - _LIBCPP_INLINE_VISIBILITY int compare(const path& __p) const _NOEXCEPT { return __compare(__p.__pn_);} - _LIBCPP_INLINE_VISIBILITY int compare(const string_type& __s) const { return __compare(__s); } - _LIBCPP_INLINE_VISIBILITY int compare(__string_view __s) const { return __compare(__s); } - _LIBCPP_INLINE_VISIBILITY int compare(const value_type* __s) const { return __compare(__s); } + _LIBCPPX_INLINE_VISIBILITY int compare(const path& __p) const _NOEXCEPT { return __compare(__p.__pn_);} + _LIBCPPX_INLINE_VISIBILITY int compare(const string_type& __s) const { return __compare(__s); } + _LIBCPPX_INLINE_VISIBILITY int compare(__string_view __s) const { return __compare(__s); } + _LIBCPPX_INLINE_VISIBILITY int compare(const value_type* __s) const { return __compare(__s); } // decomposition - _LIBCPP_INLINE_VISIBILITY path root_name() const { return string_type(__root_name()); } - _LIBCPP_INLINE_VISIBILITY path root_directory() const { return string_type(__root_directory()); } - _LIBCPP_INLINE_VISIBILITY path root_path() const { return root_name().append(string_type(__root_directory())); } - _LIBCPP_INLINE_VISIBILITY path relative_path() const { return string_type(__relative_path()); } - _LIBCPP_INLINE_VISIBILITY path parent_path() const { return string_type(__parent_path()); } - _LIBCPP_INLINE_VISIBILITY path filename() const { return string_type(__filename()); } - _LIBCPP_INLINE_VISIBILITY path stem() const { return string_type(__stem());} - _LIBCPP_INLINE_VISIBILITY path extension() const { return string_type(__extension()); } + _LIBCPPX_INLINE_VISIBILITY path root_name() const { return string_type(__root_name()); } + _LIBCPPX_INLINE_VISIBILITY path root_directory() const { return string_type(__root_directory()); } + _LIBCPPX_INLINE_VISIBILITY path root_path() const { return root_name().append(string_type(__root_directory())); } + _LIBCPPX_INLINE_VISIBILITY path relative_path() const { return string_type(__relative_path()); } + _LIBCPPX_INLINE_VISIBILITY path parent_path() const { return string_type(__parent_path()); } + _LIBCPPX_INLINE_VISIBILITY path filename() const { return string_type(__filename()); } + _LIBCPPX_INLINE_VISIBILITY path stem() const { return string_type(__stem());} + _LIBCPPX_INLINE_VISIBILITY path extension() const { return string_type(__extension()); } // query - _LIBCPP_INLINE_VISIBILITY bool empty() const _NOEXCEPT { return __pn_.empty(); } + _LIBCPPX_INLINE_VISIBILITY bool empty() const _NOEXCEPT { return __pn_.empty(); } - _LIBCPP_INLINE_VISIBILITY bool has_root_name() const { return !__root_name().empty(); } - _LIBCPP_INLINE_VISIBILITY bool has_root_directory() const { return !__root_directory().empty(); } - _LIBCPP_INLINE_VISIBILITY bool has_root_path() const { return !__root_path_raw().empty(); } - _LIBCPP_INLINE_VISIBILITY bool has_relative_path() const { return !__relative_path().empty(); } - _LIBCPP_INLINE_VISIBILITY bool has_parent_path() const { return !__parent_path().empty(); } - _LIBCPP_INLINE_VISIBILITY bool has_filename() const { return !__filename().empty(); } - _LIBCPP_INLINE_VISIBILITY bool has_stem() const { return !__stem().empty(); } - _LIBCPP_INLINE_VISIBILITY bool has_extension() const { return !__extension().empty(); } + _LIBCPPX_INLINE_VISIBILITY bool has_root_name() const { return !__root_name().empty(); } + _LIBCPPX_INLINE_VISIBILITY bool has_root_directory() const { return !__root_directory().empty(); } + _LIBCPPX_INLINE_VISIBILITY bool has_root_path() const { return !__root_path_raw().empty(); } + _LIBCPPX_INLINE_VISIBILITY bool has_relative_path() const { return !__relative_path().empty(); } + _LIBCPPX_INLINE_VISIBILITY bool has_parent_path() const { return !__parent_path().empty(); } + _LIBCPPX_INLINE_VISIBILITY bool has_filename() const { return !__filename().empty(); } + _LIBCPPX_INLINE_VISIBILITY bool has_stem() const { return !__stem().empty(); } + _LIBCPPX_INLINE_VISIBILITY bool has_extension() const { return !__extension().empty(); } - _LIBCPP_INLINE_VISIBILITY bool is_absolute() const { return has_root_directory(); } - _LIBCPP_INLINE_VISIBILITY bool is_relative() const { return !is_absolute(); } + _LIBCPPX_INLINE_VISIBILITY bool is_absolute() const { return has_root_directory(); } + _LIBCPPX_INLINE_VISIBILITY bool is_relative() const { return !is_absolute(); } // iterators - class _LIBCPP_TYPE_VIS iterator; + class _LIBCPPX_TYPE_VIS iterator; typedef iterator const_iterator; iterator begin() const; @@ -994,50 +994,50 @@ iterator end() const; private: - inline _LIBCPP_INLINE_VISIBILITY + inline _LIBCPPX_INLINE_VISIBILITY path& __assign_view(__string_view const& __s) noexcept { __pn_ = string_type(__s); return *this; } string_type __pn_; }; -inline _LIBCPP_ALWAYS_INLINE +inline _LIBCPPX_ALWAYS_INLINE void swap(path& __lhs, path& __rhs) _NOEXCEPT { __lhs.swap(__rhs); } -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS size_t hash_value(const path& __p) _NOEXCEPT; -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator==(const path& __lhs, const path& __rhs) _NOEXCEPT { return __lhs.compare(__rhs) == 0; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator!=(const path& __lhs, const path& __rhs) _NOEXCEPT { return __lhs.compare(__rhs) != 0; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator<(const path& __lhs, const path& __rhs) _NOEXCEPT { return __lhs.compare(__rhs) < 0; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator<=(const path& __lhs, const path& __rhs) _NOEXCEPT { return __lhs.compare(__rhs) <= 0; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator>(const path& __lhs, const path& __rhs) _NOEXCEPT { return __lhs.compare(__rhs) > 0; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator>=(const path& __lhs, const path& __rhs) _NOEXCEPT { return __lhs.compare(__rhs) >= 0; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path operator/(const path& __lhs, const path& __rhs) { return path(__lhs) /= __rhs; } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY typename enable_if::value && is_same<_Traits, char_traits>::value, basic_ostream<_CharT, _Traits>& @@ -1048,7 +1048,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY typename enable_if::value || !is_same<_Traits, char_traits>::value, basic_ostream<_CharT, _Traits>& @@ -1059,7 +1059,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, path& __p) { @@ -1070,7 +1070,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY typename enable_if<__is_pathable<_Source>::value, path>::type u8path(const _Source& __s){ static_assert(is_same::__char_type, char>::value, @@ -1079,7 +1079,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY typename enable_if<__is_pathable<_InputIt>::value, path>::type u8path(_InputIt __f, _InputIt __l) { static_assert(is_same::__char_type, char>::value, @@ -1087,7 +1087,7 @@ return path(__f, __l); } -class _LIBCPP_TYPE_VIS path::iterator +class _LIBCPPX_TYPE_VIS path::iterator { public: typedef bidirectional_iterator_tag iterator_category; @@ -1099,7 +1099,7 @@ typedef void __stashing_iterator_tag; // See reverse_iterator and __is_stashing_iterator public: - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY iterator() : __stashed_elem_(), __path_ptr_(nullptr), __entry_(), __state_(__singular) {} @@ -1108,17 +1108,17 @@ iterator& operator=(const iterator&) = default; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY reference operator*() const { return __stashed_elem_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY pointer operator->() const { return &__stashed_elem_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY iterator& operator++() { _LIBCPP_ASSERT(__state_ != __singular, "attempting to increment a singular iterator"); @@ -1127,7 +1127,7 @@ return __increment(); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY iterator operator++(int) { iterator __it(*this); this->operator++(); @@ -1134,7 +1134,7 @@ return __it; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY iterator& operator--() { _LIBCPP_ASSERT(__state_ != __singular, "attempting to decrement a singular iterator"); @@ -1143,7 +1143,7 @@ return __decrement(); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY iterator operator--(int) { iterator __it(*this); this->operator--(); @@ -1156,7 +1156,7 @@ static constexpr unsigned char __singular = 0; static constexpr unsigned char __at_end = 6; - inline _LIBCPP_INLINE_VISIBILITY + inline _LIBCPPX_INLINE_VISIBILITY friend bool operator==(const iterator&, const iterator&); iterator& __increment(); @@ -1168,33 +1168,33 @@ unsigned char __state_; }; -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator==(const path::iterator& __lhs, const path::iterator& __rhs) { return __lhs.__path_ptr_ == __rhs.__path_ptr_ && __lhs.__entry_.data() == __rhs.__entry_.data(); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator!=(const path::iterator& __lhs, const path::iterator& __rhs) { return !(__lhs == __rhs); } -class _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error +class _LIBCPPX_EXCEPTION_ABI filesystem_error : public system_error { public: - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY filesystem_error(const string& __what, error_code __ec) : system_error(__ec, __what), __paths_(make_shared<_Storage>(path(), path())) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY filesystem_error(const string& __what, const path& __p1, error_code __ec) : system_error(__ec, __what), __paths_(make_shared<_Storage>(__p1, path())) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY filesystem_error(const string& __what, const path& __p1, const path& __p2, error_code __ec) : system_error(__ec, __what), @@ -1201,12 +1201,12 @@ __paths_(make_shared<_Storage>(__p1, __p2)) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const path& path1() const _NOEXCEPT { return __paths_->first; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const path& path2() const _NOEXCEPT { return __paths_->second; } @@ -1222,7 +1222,7 @@ }; template -_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE +_LIBCPP_NORETURN inline _LIBCPPX_ALWAYS_INLINE #ifndef _LIBCPP_NO_EXCEPTIONS void __throw_filesystem_error(_Args && ...__args) { @@ -1238,102 +1238,102 @@ // operational functions -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS path __canonical(const path&, const path&, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS void __copy(const path& __from, const path& __to, copy_options __opt, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS bool __copy_file(const path& __from, const path& __to, copy_options __opt, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS void __copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS bool __create_directories(const path& p, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS bool __create_directory(const path& p, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS bool __create_directory(const path& p, const path & attributes, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS void __create_directory_symlink(const path& __to, const path& __new_symlink, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS void __create_hard_link(const path& __to, const path& __new_hard_link, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS void __create_symlink(const path& __to, const path& __new_symlink, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS path __current_path(error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS void __current_path(const path&, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS bool __equivalent(const path&, const path&, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS uintmax_t __file_size(const path&, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS uintmax_t __hard_link_count(const path&, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS bool __fs_is_empty(const path& p, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS file_time_type __last_write_time(const path& p, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS void __last_write_time(const path& p, file_time_type new_time, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS void __permissions(const path& p, perms prms, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS path __read_symlink(const path& p, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS bool __remove(const path& p, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS uintmax_t __remove_all(const path& p, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS void __rename(const path& from, const path& to, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS void __resize_file(const path& p, uintmax_t size, error_code *ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS space_info __space(const path&, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS file_status __status(const path&, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS file_status __symlink_status(const path&, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS path __system_complete(const path&, error_code *__ec=nullptr); -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS path __temp_directory_path(error_code *__ec=nullptr); -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path current_path() { return __current_path(); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path current_path(error_code& __ec) { return __current_path(&__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void current_path(const path& __p) { __current_path(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void current_path(const path& __p, error_code& __ec) _NOEXCEPT { __current_path(__p, &__ec); } -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS path absolute(const path&, const path& __p2 = current_path()); -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path canonical(const path& __p, const path& __base = current_path()) { return __canonical(__p, __base); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path canonical(const path& __p, error_code& __ec) { path __base = __current_path(&__ec); if (__ec) return {}; @@ -1340,140 +1340,140 @@ return __canonical(__p, __base, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path canonical(const path& __p, const path& __base, error_code& __ec) { return __canonical(__p, __base, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void copy(const path& __from, const path& __to) { __copy(__from, __to, copy_options::none); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void copy(const path& __from, const path& __to, error_code& __ec) _NOEXCEPT { __copy(__from, __to, copy_options::none, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void copy(const path& __from, const path& __to, copy_options __opt) { __copy(__from, __to, __opt); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void copy(const path& __from, const path& __to, copy_options __opt, error_code& __ec) _NOEXCEPT { __copy(__from, __to, __opt, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool copy_file(const path& __from, const path& __to) { return __copy_file(__from, __to, copy_options::none); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool copy_file(const path& __from, const path& __to, error_code& __ec) _NOEXCEPT { return __copy_file(__from, __to, copy_options::none, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool copy_file(const path& __from, const path& __to, copy_options __opt) { return __copy_file(__from, __to, __opt); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool copy_file(const path& __from, const path& __to, copy_options __opt, error_code& __ec) _NOEXCEPT { return __copy_file(__from, __to, __opt, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void copy_symlink(const path& __existing, const path& __new) { __copy_symlink(__existing, __new); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void copy_symlink(const path& __ext, const path& __new, error_code& __ec) _NOEXCEPT { __copy_symlink(__ext, __new, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool create_directories(const path& __p) { return __create_directories(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool create_directories(const path& __p, error_code& __ec) _NOEXCEPT { return __create_directories(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool create_directory(const path& __p) { return __create_directory(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool create_directory(const path& __p, error_code& __ec) _NOEXCEPT { return __create_directory(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool create_directory(const path& __p, const path& __attrs) { return __create_directory(__p, __attrs); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool create_directory(const path& __p, const path& __attrs, error_code& __ec) _NOEXCEPT { return __create_directory(__p, __attrs, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void create_directory_symlink(const path& __to, const path& __new) { __create_directory_symlink(__to, __new); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void create_directory_symlink(const path& __to, const path& __new, error_code& __ec) _NOEXCEPT { __create_directory_symlink(__to, __new, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void create_hard_link(const path& __to, const path& __new) { __create_hard_link(__to, __new); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void create_hard_link(const path& __to, const path& __new, error_code& __ec) _NOEXCEPT { __create_hard_link(__to, __new, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void create_symlink(const path& __to, const path& __new) { __create_symlink(__to, __new); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void create_symlink(const path& __to, const path& __new, error_code& __ec) _NOEXCEPT { return __create_symlink(__to, __new, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool status_known(file_status __s) _NOEXCEPT { return __s.type() != file_type::none; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool exists(file_status __s) _NOEXCEPT { return status_known(__s) && __s.type() != file_type::not_found; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool exists(const path& __p) { return exists(__status(__p)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool exists(const path& __p, error_code& __ec) _NOEXCEPT { auto __s = __status(__p, &__ec); if (status_known(__s)) __ec.clear(); @@ -1480,292 +1480,292 @@ return exists(__s); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool equivalent(const path& __p1, const path& __p2) { return __equivalent(__p1, __p2); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool equivalent(const path& __p1, const path& __p2, error_code& __ec) _NOEXCEPT { return __equivalent(__p1, __p2, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY uintmax_t file_size(const path& __p) { return __file_size(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY uintmax_t file_size(const path& __p, error_code& __ec) _NOEXCEPT { return __file_size(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY uintmax_t hard_link_count(const path& __p) { return __hard_link_count(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY uintmax_t hard_link_count(const path& __p, error_code& __ec) _NOEXCEPT { return __hard_link_count(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_block_file(file_status __s) _NOEXCEPT { return __s.type() == file_type::block; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_block_file(const path& __p) { return is_block_file(__status(__p)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_block_file(const path& __p, error_code& __ec) _NOEXCEPT { return is_block_file(__status(__p, &__ec)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_character_file(file_status __s) _NOEXCEPT { return __s.type() == file_type::character; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_character_file(const path& __p) { return is_character_file(__status(__p)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_character_file(const path& __p, error_code& __ec) _NOEXCEPT { return is_character_file(__status(__p, &__ec)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_directory(file_status __s) _NOEXCEPT { return __s.type() == file_type::directory; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_directory(const path& __p) { return is_directory(__status(__p)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_directory(const path& __p, error_code& __ec) _NOEXCEPT { return is_directory(__status(__p, &__ec)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_empty(const path& __p) { return __fs_is_empty(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_empty(const path& __p, error_code& __ec) _NOEXCEPT { return __fs_is_empty(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_fifo(file_status __s) _NOEXCEPT { return __s.type() == file_type::fifo; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_fifo(const path& __p) { return is_fifo(__status(__p)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_fifo(const path& __p, error_code& __ec) _NOEXCEPT { return is_fifo(__status(__p, &__ec)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_regular_file(file_status __s) _NOEXCEPT { return __s.type() == file_type::regular; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_regular_file(const path& __p) { return is_regular_file(__status(__p)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_regular_file(const path& __p, error_code& __ec) _NOEXCEPT { return is_regular_file(__status(__p, &__ec)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_socket(file_status __s) _NOEXCEPT { return __s.type() == file_type::socket; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_socket(const path& __p) { return is_socket(__status(__p)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_socket(const path& __p, error_code& __ec) _NOEXCEPT { return is_socket(__status(__p, &__ec)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_symlink(file_status __s) _NOEXCEPT { return __s.type() == file_type::symlink; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_symlink(const path& __p) { return is_symlink(__symlink_status(__p)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_symlink(const path& __p, error_code& __ec) _NOEXCEPT { return is_symlink(__symlink_status(__p, &__ec)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_other(file_status __s) _NOEXCEPT { return exists(__s) && !is_regular_file(__s) && !is_directory(__s) && !is_symlink(__s); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_other(const path& __p) { return is_other(__status(__p)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool is_other(const path& __p, error_code& __ec) _NOEXCEPT { return is_other(__status(__p, &__ec)); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY file_time_type last_write_time(const path& __p) { return __last_write_time(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY file_time_type last_write_time(const path& __p, error_code& __ec) _NOEXCEPT { return __last_write_time(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void last_write_time(const path& __p, file_time_type __t) { __last_write_time(__p, __t); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void last_write_time(const path& __p, file_time_type __t, error_code& __ec) _NOEXCEPT { __last_write_time(__p, __t, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void permissions(const path& __p, perms __prms) { __permissions(__p, __prms); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void permissions(const path& __p, perms __prms, error_code& __ec) { __permissions(__p, __prms, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path read_symlink(const path& __p) { return __read_symlink(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path read_symlink(const path& __p, error_code& __ec) { return __read_symlink(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool remove(const path& __p) { return __remove(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool remove(const path& __p, error_code& __ec) _NOEXCEPT { return __remove(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY uintmax_t remove_all(const path& __p) { return __remove_all(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY uintmax_t remove_all(const path& __p, error_code& __ec) _NOEXCEPT { return __remove_all(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void rename(const path& __from, const path& __to) { return __rename(__from, __to); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void rename(const path& __from, const path& __to, error_code& __ec) _NOEXCEPT { return __rename(__from, __to, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void resize_file(const path& __p, uintmax_t __ns) { return __resize_file(__p, __ns); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void resize_file(const path& __p, uintmax_t __ns, error_code& __ec) _NOEXCEPT { return __resize_file(__p, __ns, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY space_info space(const path& __p) { return __space(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY space_info space(const path& __p, error_code& __ec) _NOEXCEPT { return __space(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY file_status status(const path& __p) { return __status(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY file_status status(const path& __p, error_code& __ec) _NOEXCEPT { return __status(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY file_status symlink_status(const path& __p) { return __symlink_status(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY file_status symlink_status(const path& __p, error_code& __ec) _NOEXCEPT { return __symlink_status(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path system_complete(const path& __p) { return __system_complete(__p); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path system_complete(const path& __p, error_code& __ec) { return __system_complete(__p, &__ec); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path temp_directory_path() { return __temp_directory_path(); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY path temp_directory_path(error_code& __ec) { return __temp_directory_path(&__ec); } @@ -1781,7 +1781,7 @@ directory_entry(directory_entry const&) = default; directory_entry(directory_entry&&) _NOEXCEPT = default; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY explicit directory_entry(_Path const& __p) : __p_(__p) {} ~directory_entry() {} @@ -1789,72 +1789,72 @@ directory_entry& operator=(directory_entry const&) = default; directory_entry& operator=(directory_entry&&) _NOEXCEPT = default; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void assign(_Path const& __p) { __p_ = __p; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void replace_filename(_Path const& __p) { __p_ = __p_.parent_path() / __p; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY _Path const& path() const _NOEXCEPT { return __p_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY operator const _Path&() const _NOEXCEPT { return __p_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY file_status status() const { return _VSTD_FS::status(__p_); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY file_status status(error_code& __ec) const _NOEXCEPT { return _VSTD_FS::status(__p_, __ec); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY file_status symlink_status() const { return _VSTD_FS::symlink_status(__p_); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY file_status symlink_status(error_code& __ec) const _NOEXCEPT { return _VSTD_FS::symlink_status(__p_, __ec); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY bool operator< (directory_entry const& __rhs) const _NOEXCEPT { return __p_ < __rhs.__p_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY bool operator==(directory_entry const& __rhs) const _NOEXCEPT { return __p_ == __rhs.__p_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY bool operator!=(directory_entry const& __rhs) const _NOEXCEPT { return __p_ != __rhs.__p_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY bool operator<=(directory_entry const& __rhs) const _NOEXCEPT { return __p_ <= __rhs.__p_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY bool operator> (directory_entry const& __rhs) const _NOEXCEPT { return __p_ > __rhs.__p_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY bool operator>=(directory_entry const& __rhs) const _NOEXCEPT { return __p_ >= __rhs.__p_; } @@ -1870,7 +1870,7 @@ class __dir_element_proxy { public: - inline _LIBCPP_INLINE_VISIBILITY + inline _LIBCPPX_INLINE_VISIBILITY directory_entry operator*() { return _VSTD::move(__elem_); } private: @@ -1947,19 +1947,19 @@ { return __increment(&__ec); } private: - inline _LIBCPP_INLINE_VISIBILITY + inline _LIBCPPX_INLINE_VISIBILITY friend bool operator==(const directory_iterator& __lhs, const directory_iterator& __rhs) _NOEXCEPT; // construct the dir_stream - _LIBCPP_FUNC_VIS + _LIBCPPX_FUNC_VIS directory_iterator(const path&, error_code *, directory_options = directory_options::none); - _LIBCPP_FUNC_VIS + _LIBCPPX_FUNC_VIS directory_iterator& __increment(error_code * __ec = nullptr); - _LIBCPP_FUNC_VIS + _LIBCPPX_FUNC_VIS const directory_entry& __dereference() const; private: @@ -1967,13 +1967,13 @@ }; -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator==(const directory_iterator& __lhs, const directory_iterator& __rhs) _NOEXCEPT { return __lhs.__imp_ == __rhs.__imp_; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator!=(const directory_iterator& __lhs, const directory_iterator& __rhs) _NOEXCEPT { return !(__lhs == __rhs); @@ -1980,12 +1980,12 @@ } // enable directory_iterator range-based for statements -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY directory_iterator begin(directory_iterator __iter) _NOEXCEPT { return __iter; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY directory_iterator end(const directory_iterator&) _NOEXCEPT { return directory_iterator(); } @@ -2000,24 +2000,24 @@ public: // constructors and destructor - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY recursive_directory_iterator() _NOEXCEPT : __rec_(false) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY explicit recursive_directory_iterator(const path& __p, directory_options __xoptions = directory_options::none) : recursive_directory_iterator(__p, __xoptions, nullptr) { } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY recursive_directory_iterator(const path& __p, directory_options __xoptions, error_code& __ec) _NOEXCEPT : recursive_directory_iterator(__p, __xoptions, &__ec) { } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY recursive_directory_iterator(const path& __p, error_code& __ec) _NOEXCEPT : recursive_directory_iterator(__p, directory_options::none, &__ec) { } @@ -2028,7 +2028,7 @@ recursive_directory_iterator & operator=(const recursive_directory_iterator&) = default; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY recursive_directory_iterator & operator=(recursive_directory_iterator&& __o) noexcept { // non-default implementation provided to support self-move assign. @@ -2041,11 +2041,11 @@ ~recursive_directory_iterator() = default; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const directory_entry& operator*() const { return __dereference(); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const directory_entry* operator->() const { return &__dereference(); } @@ -2052,7 +2052,7 @@ recursive_directory_iterator& operator++() { return __increment(); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY __dir_element_proxy operator++(int) { __dir_element_proxy __p(**this); __increment(); @@ -2059,25 +2059,25 @@ return __p; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY recursive_directory_iterator& increment(error_code& __ec) _NOEXCEPT { return __increment(&__ec); } - _LIBCPP_FUNC_VIS directory_options options() const; - _LIBCPP_FUNC_VIS int depth() const; + _LIBCPPX_FUNC_VIS directory_options options() const; + _LIBCPPX_FUNC_VIS int depth() const; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void pop() { __pop(); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void pop(error_code& __ec) { __pop(&__ec); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY bool recursion_pending() const { return __rec_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void disable_recursion_pending() { __rec_ = false; } @@ -2085,22 +2085,22 @@ recursive_directory_iterator(const path& __p, directory_options __opt, error_code *__ec); - _LIBCPP_FUNC_VIS + _LIBCPPX_FUNC_VIS const directory_entry& __dereference() const; - _LIBCPP_FUNC_VIS + _LIBCPPX_FUNC_VIS bool __try_recursion(error_code* __ec); - _LIBCPP_FUNC_VIS + _LIBCPPX_FUNC_VIS void __advance(error_code* __ec=nullptr); - _LIBCPP_FUNC_VIS + _LIBCPPX_FUNC_VIS recursive_directory_iterator& __increment(error_code *__ec=nullptr); - _LIBCPP_FUNC_VIS + _LIBCPPX_FUNC_VIS void __pop(error_code* __ec=nullptr); - inline _LIBCPP_INLINE_VISIBILITY + inline _LIBCPPX_INLINE_VISIBILITY friend bool operator==(const recursive_directory_iterator&, const recursive_directory_iterator&) _NOEXCEPT; @@ -2110,7 +2110,7 @@ }; // class recursive_directory_iterator -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator==(const recursive_directory_iterator& __lhs, const recursive_directory_iterator& __rhs) _NOEXCEPT { @@ -2117,7 +2117,7 @@ return __lhs.__imp_ == __rhs.__imp_; } -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY inline bool operator!=(const recursive_directory_iterator& __lhs, const recursive_directory_iterator& __rhs) _NOEXCEPT { @@ -2124,12 +2124,12 @@ return !(__lhs == __rhs); } // enable recursive_directory_iterator range-based for statements -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY recursive_directory_iterator begin(recursive_directory_iterator __iter) _NOEXCEPT { return __iter; } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY recursive_directory_iterator end(const recursive_directory_iterator&) _NOEXCEPT { return recursive_directory_iterator(); } Index: include/experimental/functional =================================================================== --- include/experimental/functional +++ include/experimental/functional @@ -110,16 +110,16 @@ #if _LIBCPP_STD_VER > 11 // default searcher template> -_LIBCPP_TYPE_VIS +_LIBCPPX_TYPE_VIS class default_searcher { public: - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY default_searcher(_ForwardIterator __f, _ForwardIterator __l, _BinaryPredicate __p = _BinaryPredicate()) : __first_(__f), __last_(__l), __pred_(__p) {} template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY pair<_ForwardIterator2, _ForwardIterator2> operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const { @@ -135,7 +135,7 @@ }; template> -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY default_searcher<_ForwardIterator, _BinaryPredicate> make_default_searcher( _ForwardIterator __f, _ForwardIterator __l, _BinaryPredicate __p = _BinaryPredicate ()) { @@ -155,17 +155,17 @@ std::unordered_map<_Key, _Value, _Hash, _BinaryPredicate> __table; public: - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY _BMSkipTable(std::size_t __sz, _Value __default, _Hash __hf, _BinaryPredicate __pred) : __default_value_(__default), __table(__sz, __hf, __pred) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void insert(const key_type &__key, value_type __val) { __table [__key] = __val; // Would skip_.insert (val) be better here? } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY value_type operator [](const key_type & __key) const { auto __it = __table.find (__key); @@ -186,19 +186,19 @@ skip_map __table; public: - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY _BMSkipTable(std::size_t /*__sz*/, _Value __default, _Hash /*__hf*/, _BinaryPredicate /*__pred*/) { std::fill_n(__table.begin(), __table.size(), __default); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void insert(key_type __key, value_type __val) { __table[static_cast(__key)] = __val; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY value_type operator [](key_type __key) const { return __table[static_cast(__key)]; @@ -209,7 +209,7 @@ template ::value_type>, class _BinaryPredicate = equal_to<>> -_LIBCPP_TYPE_VIS +_LIBCPPX_TYPE_VIS class boyer_moore_searcher { private: typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type; @@ -349,7 +349,7 @@ template::value_type>, class _BinaryPredicate = equal_to<>> -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY boyer_moore_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate> make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l, _Hash __hf = _Hash(), _BinaryPredicate __p = _BinaryPredicate ()) @@ -361,7 +361,7 @@ template ::value_type>, class _BinaryPredicate = equal_to<>> -_LIBCPP_TYPE_VIS +_LIBCPPX_TYPE_VIS class boyer_moore_horspool_searcher { private: typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type; @@ -445,7 +445,7 @@ template::value_type>, class _BinaryPredicate = equal_to<>> -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY boyer_moore_horspool_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate> make_boyer_moore_horspool_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l, _Hash __hf = _Hash(), _BinaryPredicate __p = _BinaryPredicate ()) Index: include/experimental/memory_resource =================================================================== --- include/experimental/memory_resource +++ include/experimental/memory_resource @@ -88,7 +88,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR // Round __s up to next multiple of __a. -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY size_t __aligned_allocation_size(size_t __s, size_t __a) _NOEXCEPT { _LIBCPP_ASSERT(__s + __a > __s, "aligned allocation size overflows"); @@ -96,7 +96,7 @@ } // 8.5, memory.resource -class _LIBCPP_TEMPLATE_VIS memory_resource +class _LIBCPPX_TEMPLATE_VIS memory_resource { static const size_t __max_align = alignof(max_align_t); @@ -104,15 +104,15 @@ public: virtual ~memory_resource() = default; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void* allocate(size_t __bytes, size_t __align = __max_align) { return do_allocate(__bytes, __align); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void deallocate(void * __p, size_t __bytes, size_t __align = __max_align) { do_deallocate(__p, __bytes, __align); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY bool is_equal(memory_resource const & __other) const _NOEXCEPT { return do_is_equal(__other); } @@ -124,7 +124,7 @@ }; // 8.5.4, memory.resource.eq -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator==(memory_resource const & __lhs, memory_resource const & __rhs) _NOEXCEPT { @@ -131,7 +131,7 @@ return &__lhs == &__rhs || __lhs.is_equal(__rhs); } -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator!=(memory_resource const & __lhs, memory_resource const & __rhs) _NOEXCEPT { @@ -138,16 +138,16 @@ return !(__lhs == __rhs); } -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS memory_resource * new_delete_resource() _NOEXCEPT; -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS memory_resource * null_memory_resource() _NOEXCEPT; -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS memory_resource * get_default_resource() _NOEXCEPT; -_LIBCPP_FUNC_VIS +_LIBCPPX_FUNC_VIS memory_resource * set_default_resource(memory_resource * __new_res) _NOEXCEPT; // 8.6, memory.polymorphic.allocator.class @@ -154,18 +154,18 @@ // 8.6.1, memory.polymorphic.allocator.overview template -class _LIBCPP_TEMPLATE_VIS polymorphic_allocator +class _LIBCPPX_TEMPLATE_VIS polymorphic_allocator { public: typedef _ValueType value_type; // 8.6.2, memory.polymorphic.allocator.ctor - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY polymorphic_allocator() _NOEXCEPT : __res_(_VSTD_LFTS_PMR::get_default_resource()) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY polymorphic_allocator(memory_resource * __r) _NOEXCEPT : __res_(__r) {} @@ -173,7 +173,7 @@ polymorphic_allocator(polymorphic_allocator const &) = default; template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY polymorphic_allocator(polymorphic_allocator<_Tp> const & __other) _NOEXCEPT : __res_(__other.resource()) {} @@ -182,7 +182,7 @@ operator=(polymorphic_allocator const &) = delete; // 8.6.3, memory.polymorphic.allocator.mem - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY _ValueType* allocate(size_t __n) { if (__n > __max_size()) { __throw_length_error( @@ -194,7 +194,7 @@ ); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void deallocate(_ValueType * __p, size_t __n) _NOEXCEPT { _LIBCPP_ASSERT(__n <= __max_size(), "deallocate called for size which exceeds max_size()"); @@ -202,7 +202,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void construct(_Tp* __p, _Ts &&... __args) { _VSTD_LFTS::__lfts_user_alloc_construct( @@ -211,7 +211,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void construct(pair<_T1, _T2>* __p, piecewise_construct_t, tuple<_Args1...> __x, tuple<_Args2...> __y) { @@ -234,13 +234,13 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void construct(pair<_T1, _T2>* __p) { construct(__p, piecewise_construct, tuple<>(), tuple<>()); } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void construct(pair<_T1, _T2> * __p, _Up && __u, _Vp && __v) { construct(__p, piecewise_construct , _VSTD::forward_as_tuple(_VSTD::forward<_Up>(__u)) @@ -248,7 +248,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void construct(pair<_T1, _T2> * __p, pair<_U1, _U2> const & __pr) { construct(__p, piecewise_construct , _VSTD::forward_as_tuple(__pr.first) @@ -256,7 +256,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void construct(pair<_T1, _T2> * __p, pair<_U1, _U2> && __pr){ construct(__p, piecewise_construct , _VSTD::forward_as_tuple(_VSTD::forward<_U1>(__pr.first)) @@ -264,22 +264,22 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void destroy(_Tp * __p) _NOEXCEPT { __p->~_Tp(); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY polymorphic_allocator select_on_container_copy_construction() const _NOEXCEPT { return polymorphic_allocator(); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY memory_resource * resource() const _NOEXCEPT { return __res_; } private: template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY tuple<_Args&&...> __transform_tuple(integral_constant, tuple<_Args...>&& __t, __tuple_indices<_Idx...>) const @@ -288,7 +288,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY tuple __transform_tuple(integral_constant, tuple<_Args...> && __t, __tuple_indices<_Idx...>) const @@ -299,7 +299,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY tuple<_Args&&..., memory_resource*> __transform_tuple(integral_constant, tuple<_Args...> && __t, __tuple_indices<_Idx...>) const @@ -308,7 +308,7 @@ return _Tup(_VSTD::get<_Idx>(_VSTD::move(__t))..., resource()); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY size_t __max_size() const _NOEXCEPT { return numeric_limits::max() / sizeof(value_type); } @@ -318,7 +318,7 @@ // 8.6.4, memory.polymorphic.allocator.eq template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator==(polymorphic_allocator<_Tp> const & __lhs, polymorphic_allocator<_Up> const & __rhs) _NOEXCEPT { @@ -326,7 +326,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY bool operator!=(polymorphic_allocator<_Tp> const & __lhs, polymorphic_allocator<_Up> const & __rhs) _NOEXCEPT { @@ -337,7 +337,7 @@ // 8.7.1, memory.resource.adaptor.overview template -class _LIBCPP_TEMPLATE_VIS __resource_adaptor_imp +class _LIBCPPX_TEMPLATE_VIS __resource_adaptor_imp : public memory_resource { using _CTraits = allocator_traits<_CharAlloc>; @@ -364,12 +364,12 @@ // 8.7.2, memory.resource.adaptor.ctor - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY explicit __resource_adaptor_imp(allocator_type const & __a) : __alloc_(__a) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY explicit __resource_adaptor_imp(allocator_type && __a) : __alloc_(_VSTD::move(__a)) {} @@ -377,7 +377,7 @@ __resource_adaptor_imp & operator=(__resource_adaptor_imp const &) = default; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY allocator_type get_allocator() const { return __alloc_; } @@ -409,7 +409,7 @@ } private: - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY size_t __max_size() const _NOEXCEPT { return numeric_limits::max() - _MaxAlign; } Index: include/experimental/numeric =================================================================== --- include/experimental/numeric +++ include/experimental/numeric @@ -52,7 +52,7 @@ template struct __abs<_Result, _Source, true> { - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY _Result operator()(_Source __t) const noexcept { if (__t >= 0) return __t; @@ -63,13 +63,13 @@ template struct __abs<_Result, _Source, false> { - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY _Result operator()(_Source __t) const noexcept { return __t; } }; template -_LIBCPP_CONSTEXPR _LIBCPP_HIDDEN +_LIBCPP_CONSTEXPR _LIBCPPX_HIDDEN inline _Tp __gcd(_Tp __m, _Tp __n) { static_assert((!is_signed<_Tp>::value), "" ); @@ -78,7 +78,7 @@ template -_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY +_LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY common_type_t<_Tp,_Up> gcd(_Tp __m, _Up __n) { @@ -93,7 +93,7 @@ } template -_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY +_LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY common_type_t<_Tp,_Up> lcm(_Tp __m, _Up __n) { Index: include/experimental/optional =================================================================== --- include/experimental/optional +++ include/experimental/optional @@ -160,7 +160,7 @@ _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access +class _LIBCPPX_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access : public std::logic_error { public: @@ -199,7 +199,7 @@ }; bool __engaged_ = false; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY ~__optional_storage() { if (__engaged_) @@ -206,11 +206,11 @@ __val_.~value_type(); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr __optional_storage() noexcept : __null_state_('\0') {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY __optional_storage(const __optional_storage& __x) : __engaged_(__x.__engaged_) { @@ -218,7 +218,7 @@ ::new((void*)_VSTD::addressof(__val_)) value_type(__x.__val_); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY __optional_storage(__optional_storage&& __x) noexcept(is_nothrow_move_constructible::value) : __engaged_(__x.__engaged_) @@ -227,18 +227,18 @@ ::new((void*)_VSTD::addressof(__val_)) value_type(_VSTD::move(__x.__val_)); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr __optional_storage(const value_type& __v) : __val_(__v), __engaged_(true) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr __optional_storage(value_type&& __v) : __val_(_VSTD::move(__v)), __engaged_(true) {} template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr explicit __optional_storage(in_place_t, _Args&&... __args) : __val_(_VSTD::forward<_Args>(__args)...), @@ -257,11 +257,11 @@ }; bool __engaged_ = false; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr __optional_storage() noexcept : __null_state_('\0') {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY __optional_storage(const __optional_storage& __x) : __engaged_(__x.__engaged_) { @@ -269,7 +269,7 @@ ::new((void*)_VSTD::addressof(__val_)) value_type(__x.__val_); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY __optional_storage(__optional_storage&& __x) noexcept(is_nothrow_move_constructible::value) : __engaged_(__x.__engaged_) @@ -278,18 +278,18 @@ ::new((void*)_VSTD::addressof(__val_)) value_type(_VSTD::move(__x.__val_)); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr __optional_storage(const value_type& __v) : __val_(__v), __engaged_(true) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr __optional_storage(value_type&& __v) : __val_(_VSTD::move(__v)), __engaged_(true) {} template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr explicit __optional_storage(in_place_t, _Args&&... __args) : __val_(_VSTD::forward<_Args>(__args)...), @@ -315,14 +315,14 @@ static_assert(is_nothrow_destructible::value, "Instantiation of optional with an object type that is not noexcept destructible is undefined behavior."); - _LIBCPP_INLINE_VISIBILITY constexpr optional() noexcept {} - _LIBCPP_INLINE_VISIBILITY optional(const optional&) = default; - _LIBCPP_INLINE_VISIBILITY optional(optional&&) = default; - _LIBCPP_INLINE_VISIBILITY ~optional() = default; - _LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {} - _LIBCPP_INLINE_VISIBILITY constexpr optional(const value_type& __v) + _LIBCPPX_INLINE_VISIBILITY constexpr optional() noexcept {} + _LIBCPPX_INLINE_VISIBILITY optional(const optional&) = default; + _LIBCPPX_INLINE_VISIBILITY optional(optional&&) = default; + _LIBCPPX_INLINE_VISIBILITY ~optional() = default; + _LIBCPPX_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {} + _LIBCPPX_INLINE_VISIBILITY constexpr optional(const value_type& __v) : __base(__v) {} - _LIBCPP_INLINE_VISIBILITY constexpr optional(value_type&& __v) + _LIBCPPX_INLINE_VISIBILITY constexpr optional(value_type&& __v) : __base(_VSTD::move(__v)) {} template ::value >::type > - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr explicit optional(in_place_t, _Args&&... __args) : __base(in_place, _VSTD::forward<_Args>(__args)...) {} @@ -342,12 +342,12 @@ is_constructible&, _Args...>::value >::type > - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr explicit optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args) : __base(in_place, __il, _VSTD::forward<_Args>(__args)...) {} - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY optional& operator=(nullopt_t) noexcept { if (this->__engaged_) @@ -358,7 +358,7 @@ return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY optional& operator=(const optional& __opt) { @@ -378,7 +378,7 @@ return *this; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY optional& operator=(optional&& __opt) noexcept(is_nothrow_move_assignable::value && @@ -409,7 +409,7 @@ is_assignable::value >::type > - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY optional& operator=(_Up&& __v) { @@ -429,7 +429,7 @@ is_constructible::value >::type > - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void emplace(_Args&&... __args) { @@ -445,7 +445,7 @@ is_constructible&, _Args...>::value >::type > - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void emplace(initializer_list<_Up> __il, _Args&&... __args) { @@ -455,7 +455,7 @@ this->__engaged_ = true; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY void swap(optional& __opt) noexcept(is_nothrow_move_constructible::value && @@ -485,7 +485,7 @@ } } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr value_type const* operator->() const @@ -498,7 +498,7 @@ #endif } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY value_type* operator->() { @@ -506,7 +506,7 @@ return _VSTD::addressof(this->__val_); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr const value_type& operator*() const @@ -515,7 +515,7 @@ return this->__val_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY value_type& operator*() { @@ -523,10 +523,10 @@ return this->__val_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr explicit operator bool() const noexcept {return this->__engaged_;} - _LIBCPP_NORETURN _LIBCPP_INLINE_VISIBILITY + _LIBCPP_NORETURN _LIBCPPX_INLINE_VISIBILITY #ifndef _LIBCPP_NO_EXCEPTIONS _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS #endif @@ -539,7 +539,7 @@ #endif } - _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS + _LIBCPPX_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS constexpr value_type const& value() const { if (!this->__engaged_) @@ -547,7 +547,7 @@ return this->__val_; } - _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS + _LIBCPPX_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS value_type& value() { if (!this->__engaged_) @@ -556,7 +556,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr value_type value_or(_Up&& __v) const& { static_assert(is_copy_constructible::value, @@ -568,7 +568,7 @@ } template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY value_type value_or(_Up&& __v) && { static_assert(is_move_constructible::value, @@ -580,7 +580,7 @@ } private: - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY value_type const* __operator_arrow(true_type) const { @@ -587,7 +587,7 @@ return _VSTD::addressof(this->__val_); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY constexpr value_type const* __operator_arrow(false_type) const @@ -598,7 +598,7 @@ // Comparisons between optionals template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator==(const optional<_Tp>& __x, const optional<_Tp>& __y) @@ -611,7 +611,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator!=(const optional<_Tp>& __x, const optional<_Tp>& __y) @@ -620,7 +620,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator<(const optional<_Tp>& __x, const optional<_Tp>& __y) @@ -633,7 +633,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator>(const optional<_Tp>& __x, const optional<_Tp>& __y) @@ -642,7 +642,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator<=(const optional<_Tp>& __x, const optional<_Tp>& __y) @@ -651,7 +651,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator>=(const optional<_Tp>& __x, const optional<_Tp>& __y) @@ -662,7 +662,7 @@ // Comparisons with nullopt template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator==(const optional<_Tp>& __x, nullopt_t) noexcept @@ -671,7 +671,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator==(nullopt_t, const optional<_Tp>& __x) noexcept @@ -680,7 +680,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator!=(const optional<_Tp>& __x, nullopt_t) noexcept @@ -689,7 +689,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator!=(nullopt_t, const optional<_Tp>& __x) noexcept @@ -698,7 +698,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator<(const optional<_Tp>&, nullopt_t) noexcept @@ -707,7 +707,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator<(nullopt_t, const optional<_Tp>& __x) noexcept @@ -716,7 +716,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator<=(const optional<_Tp>& __x, nullopt_t) noexcept @@ -725,7 +725,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator<=(nullopt_t, const optional<_Tp>&) noexcept @@ -734,7 +734,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator>(const optional<_Tp>& __x, nullopt_t) noexcept @@ -743,7 +743,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator>(nullopt_t, const optional<_Tp>&) noexcept @@ -752,7 +752,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator>=(const optional<_Tp>&, nullopt_t) noexcept @@ -761,7 +761,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator>=(nullopt_t, const optional<_Tp>& __x) noexcept @@ -771,7 +771,7 @@ // Comparisons with T template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator==(const optional<_Tp>& __x, const _Tp& __v) @@ -780,7 +780,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator==(const _Tp& __v, const optional<_Tp>& __x) @@ -789,7 +789,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator!=(const optional<_Tp>& __x, const _Tp& __v) @@ -798,7 +798,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator!=(const _Tp& __v, const optional<_Tp>& __x) @@ -807,7 +807,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator<(const optional<_Tp>& __x, const _Tp& __v) @@ -816,7 +816,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator<(const _Tp& __v, const optional<_Tp>& __x) @@ -825,7 +825,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator<=(const optional<_Tp>& __x, const _Tp& __v) @@ -834,7 +834,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator<=(const _Tp& __v, const optional<_Tp>& __x) @@ -843,7 +843,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator>(const optional<_Tp>& __x, const _Tp& __v) @@ -852,7 +852,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator>(const _Tp& __v, const optional<_Tp>& __x) @@ -861,7 +861,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator>=(const optional<_Tp>& __x, const _Tp& __v) @@ -870,7 +870,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr bool operator>=(const _Tp& __v, const optional<_Tp>& __x) @@ -880,7 +880,7 @@ template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY void swap(optional<_Tp>& __x, optional<_Tp>& __y) noexcept(noexcept(__x.swap(__y))) { @@ -888,7 +888,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY constexpr optional::type> make_optional(_Tp&& __v) @@ -901,12 +901,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS hash > +struct _LIBCPPX_TEMPLATE_VIS hash > { typedef std::experimental::optional<_Tp> argument_type; typedef size_t result_type; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY result_type operator()(const argument_type& __opt) const _NOEXCEPT { return static_cast(__opt) ? hash<_Tp>()(*__opt) : 0; Index: include/experimental/propagate_const =================================================================== --- include/experimental/propagate_const +++ include/experimental/propagate_const @@ -125,11 +125,11 @@ class propagate_const; template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR +inline _LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const _Up& get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT; template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR +inline _LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR _Up& get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT; template @@ -299,7 +299,7 @@ template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, nullptr_t) { return _VSTD_LFTS_V2::get_underlying(__pt) == nullptr; @@ -306,7 +306,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator==(nullptr_t, const propagate_const<_Tp>& __pt) { return nullptr == _VSTD_LFTS_V2::get_underlying(__pt); @@ -313,7 +313,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, nullptr_t) { return _VSTD_LFTS_V2::get_underlying(__pt) != nullptr; @@ -320,7 +320,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator!=(nullptr_t, const propagate_const<_Tp>& __pt) { return nullptr != _VSTD_LFTS_V2::get_underlying(__pt); @@ -327,7 +327,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { @@ -335,7 +335,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { @@ -343,7 +343,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { @@ -351,7 +351,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { @@ -359,7 +359,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { @@ -367,7 +367,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { @@ -375,7 +375,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, const _Up& __u) { return _VSTD_LFTS_V2::get_underlying(__pt) == __u; @@ -382,7 +382,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, const _Up& __u) { return _VSTD_LFTS_V2::get_underlying(__pt) != __u; @@ -389,7 +389,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt, const _Up& __u) { return _VSTD_LFTS_V2::get_underlying(__pt) < __u; @@ -396,7 +396,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt, const _Up& __u) { return _VSTD_LFTS_V2::get_underlying(__pt) > __u; @@ -403,7 +403,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt, const _Up& __u) { return _VSTD_LFTS_V2::get_underlying(__pt) <= __u; @@ -410,7 +410,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt, const _Up& __u) { return _VSTD_LFTS_V2::get_underlying(__pt) >= __u; @@ -418,7 +418,7 @@ template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator==(const _Tp& __t, const propagate_const<_Up>& __pu) { return __t == _VSTD_LFTS_V2::get_underlying(__pu); @@ -425,7 +425,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator!=(const _Tp& __t, const propagate_const<_Up>& __pu) { return __t != _VSTD_LFTS_V2::get_underlying(__pu); @@ -432,7 +432,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator<(const _Tp& __t, const propagate_const<_Up>& __pu) { return __t < _VSTD_LFTS_V2::get_underlying(__pu); @@ -439,7 +439,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator>(const _Tp& __t, const propagate_const<_Up>& __pu) { return __t > _VSTD_LFTS_V2::get_underlying(__pu); @@ -446,7 +446,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator<=(const _Tp& __t, const propagate_const<_Up>& __pu) { return __t <= _VSTD_LFTS_V2::get_underlying(__pu); @@ -453,7 +453,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator>=(const _Tp& __t, const propagate_const<_Up>& __pu) { return __t >= _VSTD_LFTS_V2::get_underlying(__pu); @@ -460,7 +460,7 @@ } template -_LIBCPP_INLINE_VISIBILITY +_LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR void swap(propagate_const<_Tp>& __pc1, propagate_const<_Tp>& __pc2) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) { using _VSTD::swap; Index: include/experimental/string_view =================================================================== --- include/experimental/string_view +++ include/experimental/string_view @@ -195,7 +195,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS template > - class _LIBCPP_TEMPLATE_VIS basic_string_view { + class _LIBCPPX_TEMPLATE_VIS basic_string_view { public: // types typedef _Traits traits_type; @@ -213,21 +213,21 @@ static _LIBCPP_CONSTEXPR const size_type npos = -1; // size_type(-1); // [string.view.cons], construct/copy - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY basic_string_view() _NOEXCEPT : __data (nullptr), __size(0) {} - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY basic_string_view(const basic_string_view&) _NOEXCEPT = default; - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY basic_string_view& operator=(const basic_string_view&) _NOEXCEPT = default; template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY basic_string_view(const basic_string<_CharT, _Traits, _Allocator>& __str) _NOEXCEPT : __data (__str.data()), __size(__str.size()) {} - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY basic_string_view(const _CharT* __s, size_type __len) : __data(__s), __size(__len) { @@ -234,53 +234,53 @@ // _LIBCPP_ASSERT(__len == 0 || __s != nullptr, "string_view::string_view(_CharT *, size_t): received nullptr"); } - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY basic_string_view(const _CharT* __s) : __data(__s), __size(_Traits::length(__s)) {} // [string.view.iterators], iterators - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT { return cbegin(); } - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY const_iterator end() const _NOEXCEPT { return cend(); } - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY const_iterator cbegin() const _NOEXCEPT { return __data; } - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY const_iterator cend() const _NOEXCEPT { return __data + __size; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const_reverse_iterator rbegin() const _NOEXCEPT { return const_reverse_iterator(cend()); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const_reverse_iterator rend() const _NOEXCEPT { return const_reverse_iterator(cbegin()); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const_reverse_iterator crbegin() const _NOEXCEPT { return const_reverse_iterator(cend()); } - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY const_reverse_iterator crend() const _NOEXCEPT { return const_reverse_iterator(cbegin()); } // [string.view.capacity], capacity - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY size_type size() const _NOEXCEPT { return __size; } - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY size_type length() const _NOEXCEPT { return __size; } - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT { return _VSTD::numeric_limits::max(); } - _LIBCPP_CONSTEXPR bool _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR bool _LIBCPPX_INLINE_VISIBILITY empty() const _NOEXCEPT { return __size == 0; } // [string.view.access], element access - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY const_reference operator[](size_type __pos) const { return __data[__pos]; } - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY const_reference at(size_type __pos) const { return __pos >= size() @@ -288,23 +288,23 @@ : __data[__pos]; } - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY const_reference front() const { return _LIBCPP_ASSERT(!empty(), "string_view::front(): string is empty"), __data[0]; } - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY const_reference back() const { return _LIBCPP_ASSERT(!empty(), "string_view::back(): string is empty"), __data[__size-1]; } - _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR _LIBCPPX_INLINE_VISIBILITY const_pointer data() const _NOEXCEPT { return __data; } // [string.view.modifiers], modifiers: - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY void clear() _NOEXCEPT { __data = nullptr; @@ -311,7 +311,7 @@ __size = 0; } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY void remove_prefix(size_type __n) _NOEXCEPT { _LIBCPP_ASSERT(__n <= size(), "remove_prefix() can't remove more than size()"); @@ -319,7 +319,7 @@ __size -= __n; } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY void remove_suffix(size_type __n) _NOEXCEPT { _LIBCPP_ASSERT(__n <= size(), "remove_suffix() can't remove more than size()"); @@ -326,7 +326,7 @@ __size -= __n; } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY void swap(basic_string_view& __other) _NOEXCEPT { const value_type *__p = __data; @@ -342,12 +342,12 @@ // [string.view.ops], string operations: template - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY _LIBCPP_EXPLICIT operator basic_string<_CharT, _Traits, _Allocator>() const { return basic_string<_CharT, _Traits, _Allocator>( begin(), end()); } template > - _LIBCPP_INLINE_VISIBILITY + _LIBCPPX_INLINE_VISIBILITY basic_string<_CharT, _Traits, _Allocator> to_string( const _Allocator& __a = _Allocator()) const { return basic_string<_CharT, _Traits, _Allocator> ( begin(), end(), __a ); } @@ -382,13 +382,13 @@ return __retval; } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY int compare(size_type __pos1, size_type __n1, basic_string_view __sv) const { return substr(__pos1, __n1).compare(__sv); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY int compare( size_type __pos1, size_type __n1, basic_string_view _sv, size_type __pos2, size_type __n2) const { @@ -395,19 +395,19 @@ return substr(__pos1, __n1).compare(_sv.substr(__pos2, __n2)); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY int compare(const _CharT* __s) const { return compare(basic_string_view(__s)); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY int compare(size_type __pos1, size_type __n1, const _CharT* __s) const { return substr(__pos1, __n1).compare(basic_string_view(__s)); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY int compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const { return substr(__pos1, __n1).compare(basic_string_view(__s, __n2)); @@ -414,7 +414,7 @@ } // find - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT { _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr"); @@ -422,7 +422,7 @@ (data(), size(), __s.data(), __pos, __s.size()); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find(_CharT __c, size_type __pos = 0) const _NOEXCEPT { return _VSTD::__str_find @@ -429,7 +429,7 @@ (data(), size(), __c, __pos); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find(const _CharT* __s, size_type __pos, size_type __n) const { _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find(): received nullptr"); @@ -437,7 +437,7 @@ (data(), size(), __s, __pos, __n); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find(const _CharT* __s, size_type __pos = 0) const { _LIBCPP_ASSERT(__s != nullptr, "string_view::find(): received nullptr"); @@ -446,7 +446,7 @@ } // rfind - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type rfind(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT { _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr"); @@ -454,7 +454,7 @@ (data(), size(), __s.data(), __pos, __s.size()); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type rfind(_CharT __c, size_type __pos = npos) const _NOEXCEPT { return _VSTD::__str_rfind @@ -461,7 +461,7 @@ (data(), size(), __c, __pos); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const { _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::rfind(): received nullptr"); @@ -469,7 +469,7 @@ (data(), size(), __s, __pos, __n); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type rfind(const _CharT* __s, size_type __pos=npos) const { _LIBCPP_ASSERT(__s != nullptr, "string_view::rfind(): received nullptr"); @@ -478,7 +478,7 @@ } // find_first_of - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_first_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT { _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_of(): received nullptr"); @@ -486,11 +486,11 @@ (data(), size(), __s.data(), __pos, __s.size()); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_first_of(_CharT __c, size_type __pos = 0) const _NOEXCEPT { return find(__c, __pos); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const { _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_of(): received nullptr"); @@ -498,7 +498,7 @@ (data(), size(), __s, __pos, __n); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_first_of(const _CharT* __s, size_type __pos=0) const { _LIBCPP_ASSERT(__s != nullptr, "string_view::find_first_of(): received nullptr"); @@ -507,7 +507,7 @@ } // find_last_of - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_last_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT { _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_of(): received nullptr"); @@ -515,11 +515,11 @@ (data(), size(), __s.data(), __pos, __s.size()); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_last_of(_CharT __c, size_type __pos = npos) const _NOEXCEPT { return rfind(__c, __pos); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const { _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_of(): received nullptr"); @@ -527,7 +527,7 @@ (data(), size(), __s, __pos, __n); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_last_of(const _CharT* __s, size_type __pos=npos) const { _LIBCPP_ASSERT(__s != nullptr, "string_view::find_last_of(): received nullptr"); @@ -536,7 +536,7 @@ } // find_first_not_of - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_first_not_of(basic_string_view __s, size_type __pos=0) const _NOEXCEPT { _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_not_of(): received nullptr"); @@ -544,7 +544,7 @@ (data(), size(), __s.data(), __pos, __s.size()); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_first_not_of(_CharT __c, size_type __pos=0) const _NOEXCEPT { return _VSTD::__str_find_first_not_of @@ -551,7 +551,7 @@ (data(), size(), __c, __pos); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const { _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_not_of(): received nullptr"); @@ -559,7 +559,7 @@ (data(), size(), __s, __pos, __n); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_first_not_of(const _CharT* __s, size_type __pos=0) const { _LIBCPP_ASSERT(__s != nullptr, "string_view::find_first_not_of(): received nullptr"); @@ -568,7 +568,7 @@ } // find_last_not_of - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_last_not_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT { _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_not_of(): received nullptr"); @@ -576,7 +576,7 @@ (data(), size(), __s.data(), __pos, __s.size()); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_last_not_of(_CharT __c, size_type __pos=npos) const _NOEXCEPT { return _VSTD::__str_find_last_not_of @@ -583,7 +583,7 @@ (data(), size(), __c, __pos); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const { _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_not_of(): received nullptr"); @@ -591,7 +591,7 @@ (data(), size(), __s, __pos, __n); } - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY size_type find_last_not_of(const _CharT* __s, size_type __pos=npos) const { _LIBCPP_ASSERT(__s != nullptr, "string_view::find_last_not_of(): received nullptr"); @@ -608,7 +608,7 @@ // [string.view.comparison] // operator == template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator==(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { @@ -617,7 +617,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator==(basic_string_view<_CharT, _Traits> __lhs, typename _VSTD::common_type >::type __rhs) _NOEXCEPT { @@ -626,7 +626,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator==(typename _VSTD::common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { @@ -637,7 +637,7 @@ // operator != template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator!=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { if ( __lhs.size() != __rhs.size()) @@ -646,7 +646,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator!=(basic_string_view<_CharT, _Traits> __lhs, typename _VSTD::common_type >::type __rhs) _NOEXCEPT { @@ -656,7 +656,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator!=(typename _VSTD::common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { @@ -668,7 +668,7 @@ // operator < template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator<(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { return __lhs.compare(__rhs) < 0; @@ -675,7 +675,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator<(basic_string_view<_CharT, _Traits> __lhs, typename _VSTD::common_type >::type __rhs) _NOEXCEPT { @@ -683,7 +683,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator<(typename _VSTD::common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { @@ -693,7 +693,7 @@ // operator > template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator> (basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { return __lhs.compare(__rhs) > 0; @@ -700,7 +700,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator>(basic_string_view<_CharT, _Traits> __lhs, typename _VSTD::common_type >::type __rhs) _NOEXCEPT { @@ -708,7 +708,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator>(typename _VSTD::common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { @@ -718,7 +718,7 @@ // operator <= template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator<=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { return __lhs.compare(__rhs) <= 0; @@ -725,7 +725,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator<=(basic_string_view<_CharT, _Traits> __lhs, typename _VSTD::common_type >::type __rhs) _NOEXCEPT { @@ -733,7 +733,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator<=(typename _VSTD::common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { @@ -743,7 +743,7 @@ // operator >= template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator>=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { return __lhs.compare(__rhs) >= 0; @@ -751,7 +751,7 @@ template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator>=(basic_string_view<_CharT, _Traits> __lhs, typename _VSTD::common_type >::type __rhs) _NOEXCEPT { @@ -759,7 +759,7 @@ } template - _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPPX_INLINE_VISIBILITY bool operator>=(typename _VSTD::common_type >::type __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT { @@ -786,7 +786,7 @@ // [string.view.hash] // Shamelessly stolen from template -struct _LIBCPP_TEMPLATE_VIS hash > +struct _LIBCPPX_TEMPLATE_VIS hash > : public unary_function, size_t> { size_t operator()(const std::experimental::basic_string_view<_CharT, _Traits>& __val) const _NOEXCEPT; Index: include/experimental/tuple =================================================================== --- include/experimental/tuple +++ include/experimental/tuple @@ -56,7 +56,7 @@ #endif template -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 decltype(auto) __apply_tuple_impl(_Fn && __f, _Tuple && __t, integer_sequence) { @@ -67,7 +67,7 @@ } template -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +inline _LIBCPPX_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 decltype(auto) apply(_Fn && __f, _Tuple && __t) { return _VSTD_LFTS::__apply_tuple_impl( _VSTD::forward<_Fn>(__f), _VSTD::forward<_Tuple>(__t), Index: include/experimental/type_traits =================================================================== --- include/experimental/type_traits +++ include/experimental/type_traits @@ -441,16 +441,16 @@ // 3.3.2, Other type transformations /* template -class _LIBCPP_TEMPLATE_VIS raw_invocation_type; +class _LIBCPPX_TEMPLATE_VIS raw_invocation_type; template -class _LIBCPP_TEMPLATE_VIS raw_invocation_type<_Fn(_Args...)>; +class _LIBCPPX_TEMPLATE_VIS raw_invocation_type<_Fn(_Args...)>; template -class _LIBCPP_TEMPLATE_VIS invokation_type; +class _LIBCPPX_TEMPLATE_VIS invokation_type; template -class _LIBCPP_TEMPLATE_VIS invokation_type<_Fn(_Args...)>; +class _LIBCPPX_TEMPLATE_VIS invokation_type<_Fn(_Args...)>; template using invokation_type_t = typename invokation_type<_Tp>::type; Index: include/experimental/utility =================================================================== --- include/experimental/utility +++ include/experimental/utility @@ -40,7 +40,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS - struct _LIBCPP_TEMPLATE_VIS erased_type { }; + struct _LIBCPPX_TEMPLATE_VIS erased_type { }; _LIBCPP_END_NAMESPACE_LFTS