aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-06 20:13:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-06 20:13:54 +0000
commit4a2db4d30e1653093d4d8b06e8221e2f8b723507 (patch)
tree941a9d805eb2afbba58f445381819ba0e1dc355f
parentcb08bb04c85c6dcd3d951725505317c31eeff323 (diff)
downloadsrc-4a2db4d30e1653093d4d8b06e8221e2f8b723507.tar.gz
src-4a2db4d30e1653093d4d8b06e8221e2f8b723507.zip
Vendor import of libc++ trunk r291274:vendor/libc++/libc++-trunk-r291274
Notes
Notes: svn path=/vendor/libc++/dist/; revision=311538 svn path=/vendor/libc++/libc++-trunk-r291274/; revision=311539; tag=vendor/libc++/libc++-trunk-r291274
-rw-r--r--cmake/Modules/HandleLibCXXABI.cmake10
-rw-r--r--docs/DesignDocs/VisibilityMacros.rst13
-rw-r--r--include/__config11
-rw-r--r--include/__debug2
-rw-r--r--include/__functional_038
-rw-r--r--include/__functional_base14
-rw-r--r--include/__hash_table44
-rw-r--r--include/__locale16
-rw-r--r--include/__mutex_base6
-rw-r--r--include/__nullptr2
-rw-r--r--include/__string10
-rw-r--r--include/__threading_support38
-rw-r--r--include/__tree45
-rw-r--r--include/__tuple61
-rw-r--r--include/any10
-rw-r--r--include/array6
-rw-r--r--include/bitset6
-rw-r--r--include/chrono46
-rw-r--r--include/codecvt6
-rw-r--r--include/complex14
-rw-r--r--include/deque12
-rw-r--r--include/experimental/any4
-rw-r--r--include/experimental/dynarray4
-rw-r--r--include/experimental/memory_resource6
-rw-r--r--include/experimental/optional2
-rw-r--r--include/experimental/string_view4
-rw-r--r--include/experimental/type_traits8
-rw-r--r--include/experimental/utility2
-rw-r--r--include/ext/__hash24
-rw-r--r--include/ext/hash_map26
-rw-r--r--include/ext/hash_set4
-rw-r--r--include/forward_list14
-rw-r--r--include/fstream8
-rw-r--r--include/functional156
-rw-r--r--include/future30
-rw-r--r--include/initializer_list2
-rw-r--r--include/ios6
-rw-r--r--include/iosfwd40
-rw-r--r--include/istream8
-rw-r--r--include/iterator36
-rw-r--r--include/limits8
-rw-r--r--include/list10
-rw-r--r--include/locale32
-rw-r--r--include/map105
-rw-r--r--include/memory86
-rw-r--r--include/mutex13
-rw-r--r--include/optional2
-rw-r--r--include/ostream6
-rw-r--r--include/queue10
-rw-r--r--include/random96
-rw-r--r--include/ratio22
-rw-r--r--include/regex16
-rw-r--r--include/scoped_allocator2
-rw-r--r--include/set4
-rw-r--r--include/sstream8
-rw-r--r--include/stack6
-rw-r--r--include/streambuf2
-rw-r--r--include/string8
-rw-r--r--include/string_view4
-rw-r--r--include/system_error12
-rw-r--r--include/thread6
-rw-r--r--include/tuple6
-rw-r--r--include/type_traits388
-rw-r--r--include/typeindex6
-rw-r--r--include/typeinfo105
-rw-r--r--include/unordered_map26
-rw-r--r--include/unordered_set4
-rw-r--r--include/utility12
-rw-r--r--include/valarray36
-rw-r--r--include/variant66
-rw-r--r--include/vector8
-rw-r--r--src/experimental/memory_resource.cpp6
-rw-r--r--src/include/config_elast.h2
-rw-r--r--src/memory.cpp5
-rw-r--r--src/mutex.cpp8
-rw-r--r--test/libcxx/test/config.py79
-rw-r--r--test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_cxx03.pass.cpp46
-rw-r--r--test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_new_abi.pass.cpp38
-rw-r--r--test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp31
-rw-r--r--test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp28
-rw-r--r--test/libcxx/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp36
-rw-r--r--test/libcxx/utilities/variant/variant.variant/variant.ctor/move.pass.cpp24
-rw-r--r--test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp14
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_++.pass.cpp18
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_++int.pass.cpp25
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_+=.pass.cpp21
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_--.pass.cpp18
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_--int.pass.cpp26
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_-=.pass.cpp19
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_divide=.pass.cpp17
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp28
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp17
-rw-r--r--test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp17
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp18
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp63
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp67
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp138
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp39
-rw-r--r--test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp6
-rw-r--r--test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp6
-rw-r--r--test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp4
-rw-r--r--www/cxx1z_status.html2
102 files changed, 1708 insertions, 1037 deletions
diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
index df3b4f9f5cd6..4a6382b136b8 100644
--- a/cmake/Modules/HandleLibCXXABI.cmake
+++ b/cmake/Modules/HandleLibCXXABI.cmake
@@ -10,7 +10,10 @@
# abidefines: A list of defines needed to compile libc++ with the ABI library
# abilib : The ABI library to link against.
# abifiles : A list of files (which may be relative paths) to copy into the
-# libc++ build tree for the build. These files will also be
+# libc++ build tree for the build. These files will be copied
+# twice: once into include/, so the libc++ build itself can find
+# them, and once into include/c++/v1, so that a clang built into
+# the same build area will find them. These files will also be
# installed alongside the libc++ headers.
# abidirs : A list of relative paths to create under an include directory
# in the libc++ build directory.
@@ -31,8 +34,10 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
# The place in the build tree where we store out-of-source headers.
set(LIBCXX_BUILD_HEADERS_ROOT "${CMAKE_BINARY_DIR}/include/c++-build")
file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}")
+ file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1")
foreach(_d ${abidirs})
file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}/${_d}")
+ file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1/${_d}")
endforeach()
foreach(fpath ${LIBCXX_ABILIB_FILES})
@@ -45,6 +50,9 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
file(COPY "${incpath}/${fpath}"
DESTINATION "${LIBCXX_BUILD_HEADERS_ROOT}/${dstdir}"
)
+ file(COPY "${incpath}/${fpath}"
+ DESTINATION "${CMAKE_BINARY_DIR}/include/c++/v1/${dstdir}"
+ )
if (LIBCXX_INSTALL_HEADERS)
install(FILES "${LIBCXX_BUILD_HEADERS_ROOT}/${fpath}"
DESTINATION include/c++/v1/${dstdir}
diff --git a/docs/DesignDocs/VisibilityMacros.rst b/docs/DesignDocs/VisibilityMacros.rst
index 2ee07142d85c..37539ec88884 100644
--- a/docs/DesignDocs/VisibilityMacros.rst
+++ b/docs/DesignDocs/VisibilityMacros.rst
@@ -49,13 +49,13 @@ Visibility Macros
attribute. With GCC the `visibility(...)` attribute is used and member
functions are affected.
-**_LIBCPP_TYPE_VIS_ONLY**
- The same as `_LIBCPP_TYPE_VIS` except that it may be applied to templates.
+**_LIBCPP_TEMPLATE_ONLY**
+ The same as `_LIBCPP_TYPE_VIS` except that it may be applied to class
+ templates.
**Windows Behavior**: DLLs do not support dllimport/export on class templates.
The macro has an empty definition on this platform.
- Note: This macro should be renamed `_LIBCPP_TEMPLATE_TYPE_VIS`.
**_LIBCPP_ENUM_VIS**
Mark the typeinfo of an enum as having default visibility. This attribute
@@ -74,14 +74,15 @@ Visibility Macros
a `_LIBCPP_EXTERN_TEMPLATE` declaration as being exported by the libc++ library.
This attribute must be specified on all extern class template declarations.
- This macro is used to override the `_LIBCPP_TYPE_VIS_ONLY` attribute
+ This macro is used to override the `_LIBCPP_TEMPLATE_VIS` attribute
specified on the primary template and to export the member functions produced
by the explicit instantiation in the dylib.
**GCC Behavior**: GCC ignores visibility attributes applied the type in
extern template declarations and applying an attribute results in a warning.
- However since `_LIBCPP_TYPE_VIS_ONLY` is the same as `_LIBCPP_TYPE_VIS` the
- visibility is already correct. The macro has an empty definition with GCC.
+ However since `_LIBCPP_TEMPLATE_VIS` is the same as
+ `__attribute__((visibility("default"))` the visibility is already correct.
+ The macro has an empty definition with GCC.
**Windows Behavior**: `extern template` and `dllexport` are fundamentally
incompatible *on a template class* on Windows; the former suppresses
diff --git a/include/__config b/include/__config
index 269d8635d96a..ffd37c1fbc1b 100644
--- a/include/__config
+++ b/include/__config
@@ -52,6 +52,11 @@
// provided under the alternate keyword __nullptr, which changes the mangling
// of nullptr_t. This option is ABI incompatible with GCC in C++03 mode.
#define _LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR
+// Define the `pointer_safety` enum as a C++11 strongly typed enumeration
+// instead of as a class simulating an enum. If this option is enabled
+// `pointer_safety` and `get_pointer_safety()` will no longer be available
+// in C++03.
+#define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE
#elif _LIBCPP_ABI_VERSION == 1
#if !defined(_WIN32)
// Enable compiling a definition of error_category() into the libc++ dylib.
@@ -557,7 +562,7 @@ namespace std {
#define _LIBCPP_FUNC_VIS _LIBCPP_DLL_VIS
#define _LIBCPP_EXCEPTION_ABI _LIBCPP_DLL_VIS
#define _LIBCPP_HIDDEN
-#define _LIBCPP_TYPE_VIS_ONLY
+#define _LIBCPP_TEMPLATE_VIS
#define _LIBCPP_FUNC_VIS_ONLY
#define _LIBCPP_ENUM_VIS
@@ -600,8 +605,8 @@ namespace std {
# endif
#endif
-#ifndef _LIBCPP_TYPE_VIS_ONLY
-# define _LIBCPP_TYPE_VIS_ONLY _LIBCPP_TYPE_VIS
+#ifndef _LIBCPP_TEMPLATE_VIS
+# define _LIBCPP_TEMPLATE_VIS _LIBCPP_TYPE_VIS
#endif
#ifndef _LIBCPP_FUNC_VIS_ONLY
diff --git a/include/__debug b/include/__debug
index f8c1129a3694..19f079bf2fc0 100644
--- a/include/__debug
+++ b/include/__debug
@@ -56,7 +56,7 @@ class _LIBCPP_EXCEPTION_ABI __libcpp_debug_exception;
_LIBCPP_BEGIN_NAMESPACE_STD
-struct _LIBCPP_TYPE_VIS_ONLY __libcpp_debug_info {
+struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info {
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
__libcpp_debug_info()
: __file_(nullptr), __line_(-1), __pred_(nullptr), __msg_(nullptr) {}
diff --git a/include/__functional_03 b/include/__functional_03
index a1cec8bcac95..1db7082eb3d6 100644
--- a/include/__functional_03
+++ b/include/__functional_03
@@ -445,7 +445,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::target_type() const
} // __function
template<class _Rp>
-class _LIBCPP_TYPE_VIS_ONLY function<_Rp()>
+class _LIBCPP_TEMPLATE_VIS function<_Rp()>
{
typedef __function::__base<_Rp()> __base;
aligned_storage<3*sizeof(void*)>::type __buf_;
@@ -720,7 +720,7 @@ function<_Rp()>::target() const
#endif // _LIBCPP_NO_RTTI
template<class _Rp, class _A0>
-class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_A0)>
+class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0)>
: public unary_function<_A0, _Rp>
{
typedef __function::__base<_Rp(_A0)> __base;
@@ -996,7 +996,7 @@ function<_Rp(_A0)>::target() const
#endif // _LIBCPP_NO_RTTI
template<class _Rp, class _A0, class _A1>
-class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_A0, _A1)>
+class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1)>
: public binary_function<_A0, _A1, _Rp>
{
typedef __function::__base<_Rp(_A0, _A1)> __base;
@@ -1272,7 +1272,7 @@ function<_Rp(_A0, _A1)>::target() const
#endif // _LIBCPP_NO_RTTI
template<class _Rp, class _A0, class _A1, class _A2>
-class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_A0, _A1, _A2)>
+class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1, _A2)>
{
typedef __function::__base<_Rp(_A0, _A1, _A2)> __base;
aligned_storage<3*sizeof(void*)>::type __buf_;
diff --git a/include/__functional_base b/include/__functional_base
index 6e2cfefc5972..8589d04408b4 100644
--- a/include/__functional_base
+++ b/include/__functional_base
@@ -24,14 +24,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Arg, class _Result>
-struct _LIBCPP_TYPE_VIS_ONLY unary_function
+struct _LIBCPP_TEMPLATE_VIS unary_function
{
typedef _Arg argument_type;
typedef _Result result_type;
};
template <class _Arg1, class _Arg2, class _Result>
-struct _LIBCPP_TYPE_VIS_ONLY binary_function
+struct _LIBCPP_TEMPLATE_VIS binary_function
{
typedef _Arg1 first_argument_type;
typedef _Arg2 second_argument_type;
@@ -54,7 +54,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY less : binary_function<_Tp, _Tp, bool>
+struct _LIBCPP_TEMPLATE_VIS less : binary_function<_Tp, _Tp, bool>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
@@ -63,7 +63,7 @@ struct _LIBCPP_TYPE_VIS_ONLY less : binary_function<_Tp, _Tp, bool>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY less<void>
+struct _LIBCPP_TEMPLATE_VIS less<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -382,7 +382,7 @@ struct __invoke_void_return_wrapper<void>
};
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY reference_wrapper
+class _LIBCPP_TEMPLATE_VIS reference_wrapper
: public __weak_result_type<_Tp>
{
public:
@@ -585,7 +585,7 @@ public:
// allocator_arg_t
-struct _LIBCPP_TYPE_VIS_ONLY allocator_arg_t { };
+struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { };
#if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_MEMORY)
extern const allocator_arg_t allocator_arg;
@@ -620,7 +620,7 @@ struct __uses_allocator<_Tp, _Alloc, false>
};
template <class _Tp, class _Alloc>
-struct _LIBCPP_TYPE_VIS_ONLY uses_allocator
+struct _LIBCPP_TEMPLATE_VIS uses_allocator
: public __uses_allocator<_Tp, _Alloc>
{
};
diff --git a/include/__hash_table b/include/__hash_table
index 9a0d441b37b8..1c35ec36fe40 100644
--- a/include/__hash_table
+++ b/include/__hash_table
@@ -133,12 +133,12 @@ __next_hash_pow2(size_t __n)
template <class _Tp, class _Hash, class _Equal, class _Alloc> class __hash_table;
-template <class _NodePtr> class _LIBCPP_TYPE_VIS_ONLY __hash_iterator;
-template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
-template <class _NodePtr> class _LIBCPP_TYPE_VIS_ONLY __hash_local_iterator;
-template <class _ConstNodePtr> class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator;
-template <class _HashIterator> class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator;
-template <class _HashIterator> class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator;
+template <class _NodePtr> class _LIBCPP_TEMPLATE_VIS __hash_iterator;
+template <class _ConstNodePtr> class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+template <class _NodePtr> class _LIBCPP_TEMPLATE_VIS __hash_local_iterator;
+template <class _ConstNodePtr> class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+template <class _HashIterator> class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
+template <class _HashIterator> class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
template <class _Tp>
struct __hash_key_value_types {
@@ -285,7 +285,7 @@ struct __make_hash_node_types {
};
template <class _NodePtr>
-class _LIBCPP_TYPE_VIS_ONLY __hash_iterator
+class _LIBCPP_TEMPLATE_VIS __hash_iterator
{
typedef __hash_node_types<_NodePtr> _NodeTypes;
typedef _NodePtr __node_pointer;
@@ -384,14 +384,14 @@ private:
{}
#endif
template <class, class, class, class> friend class __hash_table;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator;
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_map;
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
};
template <class _NodePtr>
-class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator
+class _LIBCPP_TEMPLATE_VIS __hash_const_iterator
{
static_assert(!is_const<typename pointer_traits<_NodePtr>::element_type>::value, "");
typedef __hash_node_types<_NodePtr> _NodeTypes;
@@ -500,13 +500,13 @@ private:
{}
#endif
template <class, class, class, class> friend class __hash_table;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator;
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_map;
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
};
template <class _NodePtr>
-class _LIBCPP_TYPE_VIS_ONLY __hash_local_iterator
+class _LIBCPP_TEMPLATE_VIS __hash_local_iterator
{
typedef __hash_node_types<_NodePtr> _NodeTypes;
typedef _NodePtr __node_pointer;
@@ -624,12 +624,12 @@ private:
}
#endif
template <class, class, class, class> friend class __hash_table;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
};
template <class _ConstNodePtr>
-class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator
+class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator
{
typedef __hash_node_types<_ConstNodePtr> _NodeTypes;
typedef _ConstNodePtr __node_pointer;
@@ -765,7 +765,7 @@ private:
}
#endif
template <class, class, class, class> friend class __hash_table;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
};
template <class _Alloc>
@@ -1324,8 +1324,8 @@ private:
void __deallocate(__next_pointer __np) _NOEXCEPT;
__next_pointer __detach() _NOEXCEPT;
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_map;
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
};
template <class _Tp, class _Hash, class _Equal, class _Alloc>
diff --git a/include/__locale b/include/__locale
index 3f29bc5e9941..f4882dee853a 100644
--- a/include/__locale
+++ b/include/__locale
@@ -190,7 +190,7 @@ use_facet(const locale& __l)
// template <class _CharT> class collate;
template <class _CharT>
-class _LIBCPP_TYPE_VIS_ONLY collate
+class _LIBCPP_TEMPLATE_VIS collate
: public locale::facet
{
public:
@@ -274,7 +274,7 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>
// template <class CharT> class collate_byname;
-template <class _CharT> class _LIBCPP_TYPE_VIS_ONLY collate_byname;
+template <class _CharT> class _LIBCPP_TEMPLATE_VIS collate_byname;
template <>
class _LIBCPP_TYPE_VIS collate_byname<char>
@@ -425,7 +425,7 @@ public:
_LIBCPP_ALWAYS_INLINE ctype_base() {}
};
-template <class _CharT> class _LIBCPP_TYPE_VIS_ONLY ctype;
+template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype;
template <>
class _LIBCPP_TYPE_VIS ctype<wchar_t>
@@ -652,7 +652,7 @@ protected:
// template <class CharT> class ctype_byname;
-template <class _CharT> class _LIBCPP_TYPE_VIS_ONLY ctype_byname;
+template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype_byname;
template <>
class _LIBCPP_TYPE_VIS ctype_byname<char>
@@ -813,7 +813,7 @@ public:
// template <class internT, class externT, class stateT> class codecvt;
-template <class _InternT, class _ExternT, class _StateT> class _LIBCPP_TYPE_VIS_ONLY codecvt;
+template <class _InternT, class _ExternT, class _StateT> class _LIBCPP_TEMPLATE_VIS codecvt;
// template <> class codecvt<char, char, mbstate_t>
@@ -1159,7 +1159,7 @@ protected:
// template <class _InternT, class _ExternT, class _StateT> class codecvt_byname
template <class _InternT, class _ExternT, class _StateT>
-class _LIBCPP_TYPE_VIS_ONLY codecvt_byname
+class _LIBCPP_TEMPLATE_VIS codecvt_byname
: public codecvt<_InternT, _ExternT, _StateT>
{
public:
@@ -1367,7 +1367,7 @@ struct __widen_from_utf8<32>
// template <class charT> class numpunct
-template <class _CharT> class _LIBCPP_TYPE_VIS_ONLY numpunct;
+template <class _CharT> class _LIBCPP_TEMPLATE_VIS numpunct;
template <>
class _LIBCPP_TYPE_VIS numpunct<char>
@@ -1433,7 +1433,7 @@ protected:
// template <class charT> class numpunct_byname
-template <class _CharT> class _LIBCPP_TYPE_VIS_ONLY numpunct_byname;
+template <class _CharT> class _LIBCPP_TEMPLATE_VIS numpunct_byname;
template <>
class _LIBCPP_TYPE_VIS numpunct_byname<char>
diff --git a/include/__mutex_base b/include/__mutex_base
index 59458ecdf7b8..cce928784a46 100644
--- a/include/__mutex_base
+++ b/include/__mutex_base
@@ -85,11 +85,11 @@ constexpr adopt_lock_t adopt_lock = adopt_lock_t();
// the mangling consistent between dialects.
#if defined(_LIBCPP_ABI_VARIADIC_LOCK_GUARD)
template <class ..._Mutexes>
-class _LIBCPP_TYPE_VIS_ONLY lock_guard;
+class _LIBCPP_TEMPLATE_VIS lock_guard;
#endif
template <class _Mutex>
-class _LIBCPP_TYPE_VIS_ONLY _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable)
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable)
#if !defined(_LIBCPP_ABI_VARIADIC_LOCK_GUARD)
lock_guard
#else
@@ -118,7 +118,7 @@ private:
};
template <class _Mutex>
-class _LIBCPP_TYPE_VIS_ONLY unique_lock
+class _LIBCPP_TEMPLATE_VIS unique_lock
{
public:
typedef _Mutex mutex_type;
diff --git a/include/__nullptr b/include/__nullptr
index 38ee379eff9d..a341234f5d19 100644
--- a/include/__nullptr
+++ b/include/__nullptr
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-struct _LIBCPP_TYPE_VIS_ONLY nullptr_t
+struct _LIBCPP_TEMPLATE_VIS nullptr_t
{
void* __lx;
diff --git a/include/__string b/include/__string
index b612d6ba627d..0b851b9f9e2b 100644
--- a/include/__string
+++ b/include/__string
@@ -69,7 +69,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// char_traits
template <class _CharT>
-struct _LIBCPP_TYPE_VIS_ONLY char_traits
+struct _LIBCPP_TEMPLATE_VIS char_traits
{
typedef _CharT char_type;
typedef int int_type;
@@ -192,7 +192,7 @@ char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
// char_traits<char>
template <>
-struct _LIBCPP_TYPE_VIS_ONLY char_traits<char>
+struct _LIBCPP_TEMPLATE_VIS char_traits<char>
{
typedef char char_type;
typedef int int_type;
@@ -237,7 +237,7 @@ struct _LIBCPP_TYPE_VIS_ONLY char_traits<char>
// char_traits<wchar_t>
template <>
-struct _LIBCPP_TYPE_VIS_ONLY char_traits<wchar_t>
+struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t>
{
typedef wchar_t char_type;
typedef wint_t int_type;
@@ -283,7 +283,7 @@ struct _LIBCPP_TYPE_VIS_ONLY char_traits<wchar_t>
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
template <>
-struct _LIBCPP_TYPE_VIS_ONLY char_traits<char16_t>
+struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
{
typedef char16_t char_type;
typedef uint_least16_t int_type;
@@ -402,7 +402,7 @@ char_traits<char16_t>::assign(char_type* __s, size_t __n, char_type __a) _NOEXCE
}
template <>
-struct _LIBCPP_TYPE_VIS_ONLY char_traits<char32_t>
+struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
{
typedef char32_t char_type;
typedef uint_least32_t int_type;
diff --git a/include/__threading_support b/include/__threading_support
index b1eaf25ae8a4..b4383b92c287 100644
--- a/include/__threading_support
+++ b/include/__threading_support
@@ -63,6 +63,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
typedef pthread_mutex_t __libcpp_mutex_t;
#define _LIBCPP_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+typedef pthread_mutex_t __libcpp_recursive_mutex_t;
+
// Condition Variable
typedef pthread_cond_t __libcpp_condvar_t;
#define _LIBCPP_CONDVAR_INITIALIZER PTHREAD_COND_INITIALIZER
@@ -83,7 +85,19 @@ typedef pthread_key_t __libcpp_tls_key;
// Mutex
_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m);
+int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m);
+
+_LIBCPP_THREAD_ABI_VISIBILITY
+int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m);
+
+_LIBCPP_THREAD_ABI_VISIBILITY
+int __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m);
+
+_LIBCPP_THREAD_ABI_VISIBILITY
+int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m);
+
+_LIBCPP_THREAD_ABI_VISIBILITY
+int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m);
_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_mutex_lock(__libcpp_mutex_t *__m);
@@ -164,7 +178,7 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p);
#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || \
defined(_LIBCPP_BUILDING_THREAD_API_EXTERNAL_PTHREAD)
-int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m)
+int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m)
{
pthread_mutexattr_t attr;
int __ec = pthread_mutexattr_init(&attr);
@@ -188,6 +202,26 @@ int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m)
return 0;
}
+int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m)
+{
+ return pthread_mutex_lock(__m);
+}
+
+int __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
+{
+ return pthread_mutex_trylock(__m);
+}
+
+int __libcpp_recursive_mutex_unlock(__libcpp_mutex_t *__m)
+{
+ return pthread_mutex_unlock(__m);
+}
+
+int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m)
+{
+ return pthread_mutex_destroy(__m);
+}
+
int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
{
return pthread_mutex_lock(__m);
diff --git a/include/__tree b/include/__tree
index 485a6c13af40..dd32f7005866 100644
--- a/include/__tree
+++ b/include/__tree
@@ -25,9 +25,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Compare, class _Allocator> class __tree;
template <class _Tp, class _NodePtr, class _DiffType>
- class _LIBCPP_TYPE_VIS_ONLY __tree_iterator;
+ class _LIBCPP_TEMPLATE_VIS __tree_iterator;
template <class _Tp, class _ConstNodePtr, class _DiffType>
- class _LIBCPP_TYPE_VIS_ONLY __tree_const_iterator;
+ class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
template <class _Pointer> class __tree_end_node;
template <class _VoidPtr> class __tree_node_base;
@@ -42,8 +42,8 @@ struct __value_type;
#endif
template <class _Allocator> class __map_node_destructor;
-template <class _TreeIterator> class _LIBCPP_TYPE_VIS_ONLY __map_iterator;
-template <class _TreeIterator> class _LIBCPP_TYPE_VIS_ONLY __map_const_iterator;
+template <class _TreeIterator> class _LIBCPP_TEMPLATE_VIS __map_iterator;
+template <class _TreeIterator> class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
/*
@@ -797,7 +797,7 @@ public:
template <class _Tp, class _NodePtr, class _DiffType>
-class _LIBCPP_TYPE_VIS_ONLY __tree_iterator
+class _LIBCPP_TEMPLATE_VIS __tree_iterator
{
typedef __tree_node_types<_NodePtr> _NodeTypes;
typedef _NodePtr __node_pointer;
@@ -861,16 +861,16 @@ private:
_LIBCPP_INLINE_VISIBILITY
__node_pointer __get_np() const { return static_cast<__node_pointer>(__ptr_); }
template <class, class, class> friend class __tree;
- template <class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY __tree_const_iterator;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __map_iterator;
- template <class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY map;
- template <class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY multimap;
- template <class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY set;
- template <class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY multiset;
+ template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __map_iterator;
+ template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
+ template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
+ template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS set;
+ template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS multiset;
};
template <class _Tp, class _NodePtr, class _DiffType>
-class _LIBCPP_TYPE_VIS_ONLY __tree_const_iterator
+class _LIBCPP_TEMPLATE_VIS __tree_const_iterator
{
typedef __tree_node_types<_NodePtr> _NodeTypes;
typedef typename _NodeTypes::__node_pointer __node_pointer;
@@ -947,11 +947,11 @@ private:
__node_pointer __get_np() const { return static_cast<__node_pointer>(__ptr_); }
template <class, class, class> friend class __tree;
- template <class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY map;
- template <class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY multimap;
- template <class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY set;
- template <class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY multiset;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __map_const_iterator;
+ template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
+ template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
+ template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS set;
+ template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS multiset;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
};
@@ -1397,10 +1397,17 @@ private:
__node_base_pointer&
__find_leaf(const_iterator __hint,
__parent_pointer& __parent, const key_type& __v);
+ // FIXME: Make this function const qualified. Unfortunetly doing so
+ // breaks existing code which uses non-const callable comparators.
template <class _Key>
__node_base_pointer&
__find_equal(__parent_pointer& __parent, const _Key& __v);
template <class _Key>
+ _LIBCPP_INLINE_VISIBILITY __node_base_pointer&
+ __find_equal(__parent_pointer& __parent, const _Key& __v) const {
+ return const_cast<__tree*>(this)->__find_equal(__parent, __v);
+ }
+ template <class _Key>
__node_base_pointer&
__find_equal(const_iterator __hint, __parent_pointer& __parent,
__node_base_pointer& __dummy,
@@ -1453,8 +1460,8 @@ private:
__node_pointer __detach();
static __node_pointer __detach(__node_pointer);
- template <class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY map;
- template <class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY multimap;
+ template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
+ template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
};
template <class _Tp, class _Compare, class _Allocator>
diff --git a/include/__tuple b/include/__tuple
index 7aad08163662..4193d2cfffb7 100644
--- a/include/__tuple
+++ b/include/__tuple
@@ -22,51 +22,56 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_size;
+template <class _Tp> class _LIBCPP_TEMPLATE_VIS tuple_size;
-struct __empty_tuple_size_base {};
-
-template <class _Tp, class = void>
-struct __tuple_size_base_type {
- typedef __empty_tuple_size_base type;
-};
+#if !defined(_LIBCPP_CXX03_LANG)
+template <class _Tp, class...>
+using __enable_if_tuple_size_imp = _Tp;
template <class _Tp>
-struct __tuple_size_base_type<_Tp, typename __void_t<decltype(tuple_size<_Tp>::value)>::type>
-{
- typedef integral_constant<size_t, tuple_size<_Tp>::value> type;
-};
+class _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
+ const _Tp,
+ typename enable_if<!is_volatile<_Tp>::value>::type,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+ : public integral_constant<size_t, tuple_size<_Tp>::value> {};
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY tuple_size<const _Tp>
- : public __tuple_size_base_type<_Tp>::type {};
+class _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
+ volatile _Tp,
+ typename enable_if<!is_const<_Tp>::value>::type,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+ : public integral_constant<size_t, tuple_size<_Tp>::value> {};
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY tuple_size<volatile _Tp>
- : public __tuple_size_base_type<_Tp>::type {};
+class _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
+ const volatile _Tp,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+ : public integral_constant<size_t, tuple_size<_Tp>::value> {};
-template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY tuple_size<const volatile _Tp>
- : public __tuple_size_base_type<_Tp>::type {};
+#else
+template <class _Tp> class _LIBCPP_TEMPLATE_VIS tuple_size<const _Tp> : public tuple_size<_Tp> {};
+template <class _Tp> class _LIBCPP_TEMPLATE_VIS tuple_size<volatile _Tp> : public tuple_size<_Tp> {};
+template <class _Tp> class _LIBCPP_TEMPLATE_VIS tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
+#endif
-template <size_t _Ip, class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_element;
+template <size_t _Ip, class _Tp> class _LIBCPP_TEMPLATE_VIS tuple_element;
template <size_t _Ip, class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, const _Tp>
+class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp>
{
public:
typedef typename add_const<typename tuple_element<_Ip, _Tp>::type>::type type;
};
template <size_t _Ip, class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, volatile _Tp>
+class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp>
{
public:
typedef typename add_volatile<typename tuple_element<_Ip, _Tp>::type>::type type;
};
template <size_t _Ip, class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, const volatile _Tp>
+class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp>
{
public:
typedef typename add_cv<typename tuple_element<_Ip, _Tp>::type>::type type;
@@ -155,12 +160,12 @@ struct __make_tuple_indices
};
-template <class ..._Tp> class _LIBCPP_TYPE_VIS_ONLY tuple;
+template <class ..._Tp> class _LIBCPP_TEMPLATE_VIS tuple;
template <class... _Tp> struct __tuple_like<tuple<_Tp...> > : true_type {};
template <class ..._Tp>
-class _LIBCPP_TYPE_VIS_ONLY tuple_size<tuple<_Tp...> >
+class _LIBCPP_TEMPLATE_VIS tuple_size<tuple<_Tp...> >
: public integral_constant<size_t, sizeof...(_Tp)>
{
};
@@ -214,7 +219,7 @@ get(const pair<_T1, _T2>&&) _NOEXCEPT;
// array specializations
-template <class _Tp, size_t _Size> struct _LIBCPP_TYPE_VIS_ONLY array;
+template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
template <class _Tp, size_t _Size> struct __tuple_like<array<_Tp, _Size> > : true_type {};
@@ -277,7 +282,7 @@ using __type_pack_element = typename decltype(
#endif
template <size_t _Ip, class ..._Types>
-class _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, __tuple_types<_Types...>>
+class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...>>
{
public:
static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range");
@@ -286,7 +291,7 @@ public:
template <class ..._Tp>
-class _LIBCPP_TYPE_VIS_ONLY tuple_size<__tuple_types<_Tp...> >
+class _LIBCPP_TEMPLATE_VIS tuple_size<__tuple_types<_Tp...> >
: public integral_constant<size_t, sizeof...(_Tp)>
{
};
@@ -452,7 +457,7 @@ struct __tuple_assignable<_Tp, _Up, true, true>
template <size_t _Ip, class ..._Tp>
-class _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, tuple<_Tp...> >
+class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> >
{
public:
typedef typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
diff --git a/include/any b/include/any
index 1f70c4ff9b8d..823e1304b5cc 100644
--- a/include/any
+++ b/include/any
@@ -113,7 +113,7 @@ void __throw_bad_any_cast()
}
// Forward declarations
-class _LIBCPP_TYPE_VIS_ONLY any;
+class _LIBCPP_TEMPLATE_VIS any;
template <class _ValueType>
_LIBCPP_INLINE_VISIBILITY
@@ -148,7 +148,7 @@ namespace __any_imp
template <class _Tp> struct _LargeHandler;
template <class _Tp>
- struct _LIBCPP_TYPE_VIS_ONLY __unique_typeinfo { static constexpr int __id = 0; };
+ struct _LIBCPP_TEMPLATE_VIS __unique_typeinfo { static constexpr int __id = 0; };
template <class _Tp> constexpr int __unique_typeinfo<_Tp>::__id;
template <class _Tp>
@@ -176,7 +176,7 @@ namespace __any_imp
} // namespace __any_imp
-class _LIBCPP_TYPE_VIS_ONLY any
+class _LIBCPP_TEMPLATE_VIS any
{
public:
// construct/destruct
@@ -338,7 +338,7 @@ private:
namespace __any_imp
{
template <class _Tp>
- struct _LIBCPP_TYPE_VIS_ONLY _SmallHandler
+ struct _LIBCPP_TEMPLATE_VIS _SmallHandler
{
_LIBCPP_INLINE_VISIBILITY
static void* __handle(_Action __act, any const * __this, any * __other,
@@ -412,7 +412,7 @@ namespace __any_imp
};
template <class _Tp>
- struct _LIBCPP_TYPE_VIS_ONLY _LargeHandler
+ struct _LIBCPP_TEMPLATE_VIS _LargeHandler
{
_LIBCPP_INLINE_VISIBILITY
static void* __handle(_Action __act, any const * __this,
diff --git a/include/array b/include/array
index 7e205cbf8e48..eee9405dbeff 100644
--- a/include/array
+++ b/include/array
@@ -116,7 +116,7 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, size_t _Size>
-struct _LIBCPP_TYPE_VIS_ONLY array
+struct _LIBCPP_TEMPLATE_VIS array
{
// types:
typedef array __self;
@@ -284,11 +284,11 @@ swap(array<_Tp, _Size>& __x, array<_Tp, _Size>& __y)
}
template <class _Tp, size_t _Size>
-class _LIBCPP_TYPE_VIS_ONLY tuple_size<array<_Tp, _Size> >
+class _LIBCPP_TEMPLATE_VIS tuple_size<array<_Tp, _Size> >
: public integral_constant<size_t, _Size> {};
template <size_t _Ip, class _Tp, size_t _Size>
-class _LIBCPP_TYPE_VIS_ONLY tuple_element<_Ip, array<_Tp, _Size> >
+class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> >
{
public:
typedef _Tp type;
diff --git a/include/bitset b/include/bitset
index edc6c133c328..827a901ffd71 100644
--- a/include/bitset
+++ b/include/bitset
@@ -646,11 +646,11 @@ __bitset<0, 0>::__bitset(unsigned long long) _NOEXCEPT
{
}
-template <size_t _Size> class _LIBCPP_TYPE_VIS_ONLY bitset;
+template <size_t _Size> class _LIBCPP_TEMPLATE_VIS bitset;
template <size_t _Size> struct hash<bitset<_Size> >;
template <size_t _Size>
-class _LIBCPP_TYPE_VIS_ONLY bitset
+class _LIBCPP_TEMPLATE_VIS bitset
: private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size>
{
public:
@@ -1072,7 +1072,7 @@ operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
}
template <size_t _Size>
-struct _LIBCPP_TYPE_VIS_ONLY hash<bitset<_Size> >
+struct _LIBCPP_TEMPLATE_VIS hash<bitset<_Size> >
: public unary_function<bitset<_Size>, size_t>
{
_LIBCPP_INLINE_VISIBILITY
diff --git a/include/chrono b/include/chrono
index 74e359c58dc2..4e82ef2b5f46 100644
--- a/include/chrono
+++ b/include/chrono
@@ -77,13 +77,13 @@ public:
constexpr duration operator+() const;
constexpr duration operator-() const;
- duration& operator++();
- duration operator++(int);
- duration& operator--();
- duration operator--(int);
+ constexpr duration& operator++();
+ constexpr duration operator++(int);
+ constexpr duration& operator--();
+ constexpr duration operator--(int);
- duration& operator+=(const duration& d);
- duration& operator-=(const duration& d);
+ constexpr duration& operator+=(const duration& d);
+ constexpr duration& operator-=(const duration& d);
duration& operator*=(const rep& rhs);
duration& operator/=(const rep& rhs);
@@ -316,7 +316,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace chrono
{
-template <class _Rep, class _Period = ratio<1> > class _LIBCPP_TYPE_VIS_ONLY duration;
+template <class _Rep, class _Period = ratio<1> > class _LIBCPP_TEMPLATE_VIS duration;
template <class _Tp>
struct __is_duration : false_type {};
@@ -336,7 +336,7 @@ struct __is_duration<const volatile duration<_Rep, _Period> > : true_type {};
} // chrono
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-struct _LIBCPP_TYPE_VIS_ONLY common_type<chrono::duration<_Rep1, _Period1>,
+struct _LIBCPP_TEMPLATE_VIS common_type<chrono::duration<_Rep1, _Period1>,
chrono::duration<_Rep2, _Period2> >
{
typedef chrono::duration<typename common_type<_Rep1, _Rep2>::type,
@@ -414,7 +414,7 @@ duration_cast(const duration<_Rep, _Period>& __fd)
}
template <class _Rep>
-struct _LIBCPP_TYPE_VIS_ONLY treat_as_floating_point : is_floating_point<_Rep> {};
+struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Rep> _LIBCPP_CONSTEXPR bool treat_as_floating_point_v
@@ -422,7 +422,7 @@ template <class _Rep> _LIBCPP_CONSTEXPR bool treat_as_floating_point_v
#endif
template <class _Rep>
-struct _LIBCPP_TYPE_VIS_ONLY duration_values
+struct _LIBCPP_TEMPLATE_VIS duration_values
{
public:
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR _Rep zero() {return _Rep(0);}
@@ -485,7 +485,7 @@ round(const duration<_Rep, _Period>& __d)
// duration
template <class _Rep, class _Period>
-class _LIBCPP_TYPE_VIS_ONLY duration
+class _LIBCPP_TEMPLATE_VIS duration
{
static_assert(!__is_duration<_Rep>::value, "A duration representation can not be a duration");
static_assert(__is_ratio<_Period>::value, "Second template parameter of duration must be a std::ratio");
@@ -567,18 +567,18 @@ public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR duration operator+() const {return *this;}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR duration operator-() const {return duration(-__rep_);}
- _LIBCPP_INLINE_VISIBILITY duration& operator++() {++__rep_; return *this;}
- _LIBCPP_INLINE_VISIBILITY duration operator++(int) {return duration(__rep_++);}
- _LIBCPP_INLINE_VISIBILITY duration& operator--() {--__rep_; return *this;}
- _LIBCPP_INLINE_VISIBILITY duration operator--(int) {return duration(__rep_--);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator++() {++__rep_; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration operator++(int) {return duration(__rep_++);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator--() {--__rep_; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration operator--(int) {return duration(__rep_--);}
- _LIBCPP_INLINE_VISIBILITY duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
- _LIBCPP_INLINE_VISIBILITY duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}
- _LIBCPP_INLINE_VISIBILITY duration& operator*=(const rep& rhs) {__rep_ *= rhs; return *this;}
- _LIBCPP_INLINE_VISIBILITY duration& operator/=(const rep& rhs) {__rep_ /= rhs; return *this;}
- _LIBCPP_INLINE_VISIBILITY duration& operator%=(const rep& rhs) {__rep_ %= rhs; return *this;}
- _LIBCPP_INLINE_VISIBILITY duration& operator%=(const duration& rhs) {__rep_ %= rhs.count(); return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator*=(const rep& rhs) {__rep_ *= rhs; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator/=(const rep& rhs) {__rep_ /= rhs; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const rep& rhs) {__rep_ %= rhs; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const duration& rhs) {__rep_ %= rhs.count(); return *this;}
// special values
@@ -828,7 +828,7 @@ operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
//////////////////////////////////////////////////////////
template <class _Clock, class _Duration = typename _Clock::duration>
-class _LIBCPP_TYPE_VIS_ONLY time_point
+class _LIBCPP_TEMPLATE_VIS time_point
{
static_assert(__is_duration<_Duration>::value,
"Second template parameter of time_point must be a std::chrono::duration");
@@ -872,7 +872,7 @@ public:
} // chrono
template <class _Clock, class _Duration1, class _Duration2>
-struct _LIBCPP_TYPE_VIS_ONLY common_type<chrono::time_point<_Clock, _Duration1>,
+struct _LIBCPP_TEMPLATE_VIS common_type<chrono::time_point<_Clock, _Duration1>,
chrono::time_point<_Clock, _Duration2> >
{
typedef chrono::time_point<_Clock, typename common_type<_Duration1, _Duration2>::type> type;
diff --git a/include/codecvt b/include/codecvt
index 6eff107cd1cd..46f56acff71b 100644
--- a/include/codecvt
+++ b/include/codecvt
@@ -182,7 +182,7 @@ protected:
template <class _Elem, unsigned long _Maxcode = 0x10ffff,
codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TYPE_VIS_ONLY codecvt_utf8
+class _LIBCPP_TEMPLATE_VIS codecvt_utf8
: public __codecvt_utf8<_Elem>
{
public:
@@ -410,7 +410,7 @@ protected:
template <class _Elem, unsigned long _Maxcode = 0x10ffff,
codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TYPE_VIS_ONLY codecvt_utf16
+class _LIBCPP_TEMPLATE_VIS codecvt_utf16
: public __codecvt_utf16<_Elem, _Mode & little_endian>
{
public:
@@ -533,7 +533,7 @@ protected:
template <class _Elem, unsigned long _Maxcode = 0x10ffff,
codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TYPE_VIS_ONLY codecvt_utf8_utf16
+class _LIBCPP_TEMPLATE_VIS codecvt_utf8_utf16
: public __codecvt_utf8_utf16<_Elem>
{
public:
diff --git a/include/complex b/include/complex
index 22f568f555e7..d41971b3b4db 100644
--- a/include/complex
+++ b/include/complex
@@ -252,13 +252,13 @@ template<class T, class charT, class traits>
_LIBCPP_BEGIN_NAMESPACE_STD
-template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY complex;
+template<class _Tp> class _LIBCPP_TEMPLATE_VIS complex;
template<class _Tp> complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
template<class _Tp> complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
template<class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY complex
+class _LIBCPP_TEMPLATE_VIS complex
{
public:
typedef _Tp value_type;
@@ -316,11 +316,11 @@ public:
}
};
-template<> class _LIBCPP_TYPE_VIS_ONLY complex<double>;
-template<> class _LIBCPP_TYPE_VIS_ONLY complex<long double>;
+template<> class _LIBCPP_TEMPLATE_VIS complex<double>;
+template<> class _LIBCPP_TEMPLATE_VIS complex<long double>;
template<>
-class _LIBCPP_TYPE_VIS_ONLY complex<float>
+class _LIBCPP_TEMPLATE_VIS complex<float>
{
float __re_;
float __im_;
@@ -378,7 +378,7 @@ public:
};
template<>
-class _LIBCPP_TYPE_VIS_ONLY complex<double>
+class _LIBCPP_TEMPLATE_VIS complex<double>
{
double __re_;
double __im_;
@@ -436,7 +436,7 @@ public:
};
template<>
-class _LIBCPP_TYPE_VIS_ONLY complex<long double>
+class _LIBCPP_TEMPLATE_VIS complex<long double>
{
long double __re_;
long double __im_;
diff --git a/include/deque b/include/deque
index ed62edd3b3cd..0454162a8f73 100644
--- a/include/deque
+++ b/include/deque
@@ -167,11 +167,11 @@ template <class T, class Allocator>
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Allocator> class __deque_base;
-template <class _Tp, class _Allocator = allocator<_Tp> > class _LIBCPP_TYPE_VIS_ONLY deque;
+template <class _Tp, class _Allocator = allocator<_Tp> > class _LIBCPP_TEMPLATE_VIS deque;
template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
class _DiffType, _DiffType _BlockSize>
-class _LIBCPP_TYPE_VIS_ONLY __deque_iterator;
+class _LIBCPP_TEMPLATE_VIS __deque_iterator;
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
@@ -276,7 +276,7 @@ template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
__deque_block_size<_ValueType, _DiffType>::value
#endif
>
-class _LIBCPP_TYPE_VIS_ONLY __deque_iterator
+class _LIBCPP_TEMPLATE_VIS __deque_iterator
{
typedef _MapPointer __map_iterator;
public:
@@ -428,9 +428,9 @@ private:
: __m_iter_(__m), __ptr_(__p) {}
template <class _Tp, class _Ap> friend class __deque_base;
- template <class _Tp, class _Ap> friend class _LIBCPP_TYPE_VIS_ONLY deque;
+ template <class _Tp, class _Ap> friend class _LIBCPP_TEMPLATE_VIS deque;
template <class _Vp, class _Pp, class _Rp, class _MP, class _Dp, _Dp>
- friend class _LIBCPP_TYPE_VIS_ONLY __deque_iterator;
+ friend class _LIBCPP_TEMPLATE_VIS __deque_iterator;
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
@@ -1183,7 +1183,7 @@ __deque_base<_Tp, _Allocator>::clear() _NOEXCEPT
}
template <class _Tp, class _Allocator /*= allocator<_Tp>*/>
-class _LIBCPP_TYPE_VIS_ONLY deque
+class _LIBCPP_TEMPLATE_VIS deque
: private __deque_base<_Tp, _Allocator>
{
public:
diff --git a/include/experimental/any b/include/experimental/any
index 9ecafad637df..022b379e858b 100644
--- a/include/experimental/any
+++ b/include/experimental/any
@@ -292,7 +292,7 @@ namespace __any_imp
{
template <class _Tp>
- struct _LIBCPP_TYPE_VIS_ONLY _SmallHandler
+ struct _LIBCPP_TEMPLATE_VIS _SmallHandler
{
_LIBCPP_INLINE_VISIBILITY
static void* __handle(_Action __act, any const * __this, any * __other,
@@ -373,7 +373,7 @@ namespace __any_imp
};
template <class _Tp>
- struct _LIBCPP_TYPE_VIS_ONLY _LargeHandler
+ struct _LIBCPP_TEMPLATE_VIS _LargeHandler
{
_LIBCPP_INLINE_VISIBILITY
static void* __handle(_Action __act, any const * __this, any * __other,
diff --git a/include/experimental/dynarray b/include/experimental/dynarray
index 8ef45713ae4d..d94b29b92ff3 100644
--- a/include/experimental/dynarray
+++ b/include/experimental/dynarray
@@ -113,7 +113,7 @@ public:
namespace std { namespace experimental { inline namespace __array_extensions_v1 {
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY dynarray
+struct _LIBCPP_TEMPLATE_VIS dynarray
{
public:
// types:
@@ -295,7 +295,7 @@ dynarray<_Tp>::at(size_type __n) const
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Alloc>
-struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<std::experimental::dynarray<_Tp>, _Alloc> : true_type {};
+struct _LIBCPP_TEMPLATE_VIS uses_allocator<std::experimental::dynarray<_Tp>, _Alloc> : true_type {};
_LIBCPP_END_NAMESPACE_STD
#endif // if _LIBCPP_STD_VER > 11
diff --git a/include/experimental/memory_resource b/include/experimental/memory_resource
index 1a2cb10bbec5..b3d9ca881989 100644
--- a/include/experimental/memory_resource
+++ b/include/experimental/memory_resource
@@ -93,7 +93,7 @@ size_t __aligned_allocation_size(size_t __s, size_t __a) _NOEXCEPT
}
// 8.5, memory.resource
-class _LIBCPP_TYPE_VIS_ONLY memory_resource
+class _LIBCPP_TEMPLATE_VIS memory_resource
{
static const size_t __max_align = alignof(max_align_t);
@@ -151,7 +151,7 @@ memory_resource * set_default_resource(memory_resource * __new_res) _NOEXCEPT;
// 8.6.1, memory.polymorphic.allocator.overview
template <class _ValueType>
-class _LIBCPP_TYPE_VIS_ONLY polymorphic_allocator
+class _LIBCPP_TEMPLATE_VIS polymorphic_allocator
{
public:
typedef _ValueType value_type;
@@ -334,7 +334,7 @@ bool operator!=(polymorphic_allocator<_Tp> const & __lhs,
// 8.7.1, memory.resource.adaptor.overview
template <class _CharAlloc>
-class _LIBCPP_TYPE_VIS_ONLY __resource_adaptor_imp
+class _LIBCPP_TEMPLATE_VIS __resource_adaptor_imp
: public memory_resource
{
using _CTraits = allocator_traits<_CharAlloc>;
diff --git a/include/experimental/optional b/include/experimental/optional
index 8dcda652319b..f32941b1a8e7 100644
--- a/include/experimental/optional
+++ b/include/experimental/optional
@@ -894,7 +894,7 @@ _LIBCPP_END_NAMESPACE_LFTS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY hash<std::experimental::optional<_Tp> >
+struct _LIBCPP_TEMPLATE_VIS hash<std::experimental::optional<_Tp> >
{
typedef std::experimental::optional<_Tp> argument_type;
typedef size_t result_type;
diff --git a/include/experimental/string_view b/include/experimental/string_view
index ccc886ea98f7..674f6c355fb4 100644
--- a/include/experimental/string_view
+++ b/include/experimental/string_view
@@ -192,7 +192,7 @@ namespace std {
_LIBCPP_BEGIN_NAMESPACE_LFTS
template<class _CharT, class _Traits = _VSTD::char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_string_view {
+ class _LIBCPP_TEMPLATE_VIS basic_string_view {
public:
// types
typedef _Traits traits_type;
@@ -788,7 +788,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// [string.view.hash]
// Shamelessly stolen from <string>
template<class _CharT, class _Traits>
-struct _LIBCPP_TYPE_VIS_ONLY hash<std::experimental::basic_string_view<_CharT, _Traits> >
+struct _LIBCPP_TEMPLATE_VIS hash<std::experimental::basic_string_view<_CharT, _Traits> >
: public unary_function<std::experimental::basic_string_view<_CharT, _Traits>, size_t>
{
size_t operator()(const std::experimental::basic_string_view<_CharT, _Traits>& __val) const _NOEXCEPT;
diff --git a/include/experimental/type_traits b/include/experimental/type_traits
index d6901d41a61e..3a7593620a7e 100644
--- a/include/experimental/type_traits
+++ b/include/experimental/type_traits
@@ -441,16 +441,16 @@ template <class _Tp, class _Up> _LIBCPP_CONSTEXPR bool is_convertible_v
// 3.3.2, Other type transformations
/*
template <class>
-class _LIBCPP_TYPE_VIS_ONLY raw_invocation_type;
+class _LIBCPP_TEMPLATE_VIS raw_invocation_type;
template <class _Fn, class ..._Args>
-class _LIBCPP_TYPE_VIS_ONLY raw_invocation_type<_Fn(_Args...)>;
+class _LIBCPP_TEMPLATE_VIS raw_invocation_type<_Fn(_Args...)>;
template <class>
-class _LIBCPP_TYPE_VIS_ONLY invokation_type;
+class _LIBCPP_TEMPLATE_VIS invokation_type;
template <class _Fn, class ..._Args>
-class _LIBCPP_TYPE_VIS_ONLY invokation_type<_Fn(_Args...)>;
+class _LIBCPP_TEMPLATE_VIS invokation_type<_Fn(_Args...)>;
template <class _Tp>
using invokation_type_t = typename invokation_type<_Tp>::type;
diff --git a/include/experimental/utility b/include/experimental/utility
index b5fca6c775bc..8effa71c1316 100644
--- a/include/experimental/utility
+++ b/include/experimental/utility
@@ -40,7 +40,7 @@ inline namespace fundamentals_v1 {
_LIBCPP_BEGIN_NAMESPACE_LFTS
- struct _LIBCPP_TYPE_VIS_ONLY erased_type { };
+ struct _LIBCPP_TEMPLATE_VIS erased_type { };
_LIBCPP_END_NAMESPACE_LFTS
diff --git a/include/ext/__hash b/include/ext/__hash
index 5675d54055e0..318cb1f97b02 100644
--- a/include/ext/__hash
+++ b/include/ext/__hash
@@ -19,9 +19,9 @@
namespace __gnu_cxx {
using namespace std;
-template <typename _Tp> struct _LIBCPP_TYPE_VIS_ONLY hash { };
+template <typename _Tp> struct _LIBCPP_TEMPLATE_VIS hash { };
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<const char*>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<const char*>
: public unary_function<const char*, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -31,7 +31,7 @@ template <> struct _LIBCPP_TYPE_VIS_ONLY hash<const char*>
}
};
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<char *>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<char *>
: public unary_function<char*, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -41,7 +41,7 @@ template <> struct _LIBCPP_TYPE_VIS_ONLY hash<char *>
}
};
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<char>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<char>
: public unary_function<char, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -51,7 +51,7 @@ template <> struct _LIBCPP_TYPE_VIS_ONLY hash<char>
}
};
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<signed char>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<signed char>
: public unary_function<signed char, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -61,7 +61,7 @@ template <> struct _LIBCPP_TYPE_VIS_ONLY hash<signed char>
}
};
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned char>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
: public unary_function<unsigned char, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -71,7 +71,7 @@ template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned char>
}
};
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<short>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<short>
: public unary_function<short, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -81,7 +81,7 @@ template <> struct _LIBCPP_TYPE_VIS_ONLY hash<short>
}
};
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned short>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
: public unary_function<unsigned short, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -91,7 +91,7 @@ template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned short>
}
};
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<int>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<int>
: public unary_function<int, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -101,7 +101,7 @@ template <> struct _LIBCPP_TYPE_VIS_ONLY hash<int>
}
};
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned int>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
: public unary_function<unsigned int, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -111,7 +111,7 @@ template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned int>
}
};
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<long>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<long>
: public unary_function<long, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -121,7 +121,7 @@ template <> struct _LIBCPP_TYPE_VIS_ONLY hash<long>
}
};
-template <> struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned long>
+template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
: public unary_function<unsigned long, size_t>
{
_LIBCPP_INLINE_VISIBILITY
diff --git a/include/ext/hash_map b/include/ext/hash_map
index 5e1e9f542b17..8998bec66c31 100644
--- a/include/ext/hash_map
+++ b/include/ext/hash_map
@@ -364,7 +364,7 @@ public:
};
template <class _HashIterator>
-class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator
+class _LIBCPP_TEMPLATE_VIS __hash_map_iterator
{
_HashIterator __i_;
@@ -401,15 +401,15 @@ public:
bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
{return __x.__i_ != __y.__i_;}
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY hash_map;
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY hash_multimap;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS hash_map;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS hash_multimap;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
};
template <class _HashIterator>
-class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator
+class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator
{
_HashIterator __i_;
@@ -454,15 +454,15 @@ public:
bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
{return __x.__i_ != __y.__i_;}
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY hash_map;
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY hash_multimap;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS hash_map;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS hash_multimap;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
};
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
class _Alloc = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TYPE_VIS_ONLY hash_map
+class _LIBCPP_TEMPLATE_VIS hash_map
{
public:
// types
@@ -736,7 +736,7 @@ operator!=(const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
class _Alloc = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TYPE_VIS_ONLY hash_multimap
+class _LIBCPP_TEMPLATE_VIS hash_multimap
{
public:
// types
diff --git a/include/ext/hash_set b/include/ext/hash_set
index 91850b566d5b..7c6a8bf0ccc7 100644
--- a/include/ext/hash_set
+++ b/include/ext/hash_set
@@ -212,7 +212,7 @@ using namespace std;
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
-class _LIBCPP_TYPE_VIS_ONLY hash_set
+class _LIBCPP_TEMPLATE_VIS hash_set
{
public:
// types
@@ -434,7 +434,7 @@ operator!=(const hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
-class _LIBCPP_TYPE_VIS_ONLY hash_multiset
+class _LIBCPP_TEMPLATE_VIS hash_multiset
{
public:
// types
diff --git a/include/forward_list b/include/forward_list
index d70f7eddef6c..ce9a4b1bca90 100644
--- a/include/forward_list
+++ b/include/forward_list
@@ -266,11 +266,11 @@ struct __forward_list_node
};
-template <class _Tp, class _Alloc = allocator<_Tp> > class _LIBCPP_TYPE_VIS_ONLY forward_list;
-template<class _NodeConstPtr> class _LIBCPP_TYPE_VIS_ONLY __forward_list_const_iterator;
+template <class _Tp, class _Alloc = allocator<_Tp> > class _LIBCPP_TEMPLATE_VIS forward_list;
+template<class _NodeConstPtr> class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator;
template <class _NodePtr>
-class _LIBCPP_TYPE_VIS_ONLY __forward_list_iterator
+class _LIBCPP_TEMPLATE_VIS __forward_list_iterator
{
typedef __forward_node_traits<_NodePtr> __traits;
typedef typename __traits::__node_pointer __node_pointer;
@@ -302,8 +302,8 @@ class _LIBCPP_TYPE_VIS_ONLY __forward_list_iterator
explicit __forward_list_iterator(__node_pointer __p) _NOEXCEPT
: __ptr_(__traits::__as_iter_node(__p)) {}
- template<class, class> friend class _LIBCPP_TYPE_VIS_ONLY forward_list;
- template<class> friend class _LIBCPP_TYPE_VIS_ONLY __forward_list_const_iterator;
+ template<class, class> friend class _LIBCPP_TEMPLATE_VIS forward_list;
+ template<class> friend class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator;
public:
typedef forward_iterator_tag iterator_category;
@@ -348,7 +348,7 @@ public:
};
template <class _NodeConstPtr>
-class _LIBCPP_TYPE_VIS_ONLY __forward_list_const_iterator
+class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator
{
static_assert((!is_const<typename pointer_traits<_NodeConstPtr>::element_type>::value), "");
typedef _NodeConstPtr _NodePtr;
@@ -604,7 +604,7 @@ __forward_list_base<_Tp, _Alloc>::clear() _NOEXCEPT
}
template <class _Tp, class _Alloc /*= allocator<_Tp>*/>
-class _LIBCPP_TYPE_VIS_ONLY forward_list
+class _LIBCPP_TEMPLATE_VIS forward_list
: private __forward_list_base<_Tp, _Alloc>
{
typedef __forward_list_base<_Tp, _Alloc> base;
diff --git a/include/fstream b/include/fstream
index b8d18aadb1c9..7bcc5d450daf 100644
--- a/include/fstream
+++ b/include/fstream
@@ -180,7 +180,7 @@ typedef basic_fstream<wchar_t> wfstream;
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_filebuf
+class _LIBCPP_TEMPLATE_VIS basic_filebuf
: public basic_streambuf<_CharT, _Traits>
{
public:
@@ -999,7 +999,7 @@ basic_filebuf<_CharT, _Traits>::__write_mode()
// basic_ifstream
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_ifstream
+class _LIBCPP_TEMPLATE_VIS basic_ifstream
: public basic_istream<_CharT, _Traits>
{
public:
@@ -1161,7 +1161,7 @@ basic_ifstream<_CharT, _Traits>::close()
// basic_ofstream
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_ofstream
+class _LIBCPP_TEMPLATE_VIS basic_ofstream
: public basic_ostream<_CharT, _Traits>
{
public:
@@ -1321,7 +1321,7 @@ basic_ofstream<_CharT, _Traits>::close()
// basic_fstream
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_fstream
+class _LIBCPP_TEMPLATE_VIS basic_fstream
: public basic_iostream<_CharT, _Traits>
{
public:
diff --git a/include/functional b/include/functional
index eb8609f1469b..4f8ec65e090d 100644
--- a/include/functional
+++ b/include/functional
@@ -499,7 +499,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY plus : binary_function<_Tp, _Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS plus : binary_function<_Tp, _Tp, _Tp>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
@@ -508,7 +508,7 @@ struct _LIBCPP_TYPE_VIS_ONLY plus : binary_function<_Tp, _Tp, _Tp>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY plus<void>
+struct _LIBCPP_TEMPLATE_VIS plus<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -526,7 +526,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY minus : binary_function<_Tp, _Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS minus : binary_function<_Tp, _Tp, _Tp>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
@@ -535,7 +535,7 @@ struct _LIBCPP_TYPE_VIS_ONLY minus : binary_function<_Tp, _Tp, _Tp>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY minus<void>
+struct _LIBCPP_TEMPLATE_VIS minus<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -553,7 +553,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY multiplies : binary_function<_Tp, _Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS multiplies : binary_function<_Tp, _Tp, _Tp>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
@@ -562,7 +562,7 @@ struct _LIBCPP_TYPE_VIS_ONLY multiplies : binary_function<_Tp, _Tp, _Tp>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY multiplies<void>
+struct _LIBCPP_TEMPLATE_VIS multiplies<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -580,7 +580,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY divides : binary_function<_Tp, _Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS divides : binary_function<_Tp, _Tp, _Tp>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
@@ -589,7 +589,7 @@ struct _LIBCPP_TYPE_VIS_ONLY divides : binary_function<_Tp, _Tp, _Tp>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY divides<void>
+struct _LIBCPP_TEMPLATE_VIS divides<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -607,7 +607,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY modulus : binary_function<_Tp, _Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS modulus : binary_function<_Tp, _Tp, _Tp>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
@@ -616,7 +616,7 @@ struct _LIBCPP_TYPE_VIS_ONLY modulus : binary_function<_Tp, _Tp, _Tp>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY modulus<void>
+struct _LIBCPP_TEMPLATE_VIS modulus<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -634,7 +634,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY negate : unary_function<_Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS negate : unary_function<_Tp, _Tp>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
@@ -643,7 +643,7 @@ struct _LIBCPP_TYPE_VIS_ONLY negate : unary_function<_Tp, _Tp>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY negate<void>
+struct _LIBCPP_TEMPLATE_VIS negate<void>
{
template <class _Tp>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -661,7 +661,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY equal_to : binary_function<_Tp, _Tp, bool>
+struct _LIBCPP_TEMPLATE_VIS equal_to : binary_function<_Tp, _Tp, bool>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
@@ -670,7 +670,7 @@ struct _LIBCPP_TYPE_VIS_ONLY equal_to : binary_function<_Tp, _Tp, bool>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY equal_to<void>
+struct _LIBCPP_TEMPLATE_VIS equal_to<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -688,7 +688,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY not_equal_to : binary_function<_Tp, _Tp, bool>
+struct _LIBCPP_TEMPLATE_VIS not_equal_to : binary_function<_Tp, _Tp, bool>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
@@ -697,7 +697,7 @@ struct _LIBCPP_TYPE_VIS_ONLY not_equal_to : binary_function<_Tp, _Tp, bool>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY not_equal_to<void>
+struct _LIBCPP_TEMPLATE_VIS not_equal_to<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -715,7 +715,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY greater : binary_function<_Tp, _Tp, bool>
+struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
@@ -724,7 +724,7 @@ struct _LIBCPP_TYPE_VIS_ONLY greater : binary_function<_Tp, _Tp, bool>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY greater<void>
+struct _LIBCPP_TEMPLATE_VIS greater<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -744,7 +744,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY greater_equal : binary_function<_Tp, _Tp, bool>
+struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
@@ -753,7 +753,7 @@ struct _LIBCPP_TYPE_VIS_ONLY greater_equal : binary_function<_Tp, _Tp, bool>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY greater_equal<void>
+struct _LIBCPP_TEMPLATE_VIS greater_equal<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -771,7 +771,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY less_equal : binary_function<_Tp, _Tp, bool>
+struct _LIBCPP_TEMPLATE_VIS less_equal : binary_function<_Tp, _Tp, bool>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
@@ -780,7 +780,7 @@ struct _LIBCPP_TYPE_VIS_ONLY less_equal : binary_function<_Tp, _Tp, bool>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY less_equal<void>
+struct _LIBCPP_TEMPLATE_VIS less_equal<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -798,7 +798,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY logical_and : binary_function<_Tp, _Tp, bool>
+struct _LIBCPP_TEMPLATE_VIS logical_and : binary_function<_Tp, _Tp, bool>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
@@ -807,7 +807,7 @@ struct _LIBCPP_TYPE_VIS_ONLY logical_and : binary_function<_Tp, _Tp, bool>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY logical_and<void>
+struct _LIBCPP_TEMPLATE_VIS logical_and<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -825,7 +825,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY logical_or : binary_function<_Tp, _Tp, bool>
+struct _LIBCPP_TEMPLATE_VIS logical_or : binary_function<_Tp, _Tp, bool>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
@@ -834,7 +834,7 @@ struct _LIBCPP_TYPE_VIS_ONLY logical_or : binary_function<_Tp, _Tp, bool>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY logical_or<void>
+struct _LIBCPP_TEMPLATE_VIS logical_or<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -852,7 +852,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY logical_not : unary_function<_Tp, bool>
+struct _LIBCPP_TEMPLATE_VIS logical_not : unary_function<_Tp, bool>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x) const
@@ -861,7 +861,7 @@ struct _LIBCPP_TYPE_VIS_ONLY logical_not : unary_function<_Tp, bool>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY logical_not<void>
+struct _LIBCPP_TEMPLATE_VIS logical_not<void>
{
template <class _Tp>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -879,7 +879,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY bit_and : binary_function<_Tp, _Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS bit_and : binary_function<_Tp, _Tp, _Tp>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
@@ -888,7 +888,7 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_and : binary_function<_Tp, _Tp, _Tp>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY bit_and<void>
+struct _LIBCPP_TEMPLATE_VIS bit_and<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -906,7 +906,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY bit_or : binary_function<_Tp, _Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS bit_or : binary_function<_Tp, _Tp, _Tp>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
@@ -915,7 +915,7 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_or : binary_function<_Tp, _Tp, _Tp>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY bit_or<void>
+struct _LIBCPP_TEMPLATE_VIS bit_or<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -933,7 +933,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TYPE_VIS_ONLY bit_xor : binary_function<_Tp, _Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS bit_xor : binary_function<_Tp, _Tp, _Tp>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
@@ -942,7 +942,7 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_xor : binary_function<_Tp, _Tp, _Tp>
#if _LIBCPP_STD_VER > 11
template <>
-struct _LIBCPP_TYPE_VIS_ONLY bit_xor<void>
+struct _LIBCPP_TEMPLATE_VIS bit_xor<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -957,7 +957,7 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_xor<void>
#if _LIBCPP_STD_VER > 11
template <class _Tp = void>
-struct _LIBCPP_TYPE_VIS_ONLY bit_not : unary_function<_Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS bit_not : unary_function<_Tp, _Tp>
{
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
@@ -965,7 +965,7 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_not : unary_function<_Tp, _Tp>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY bit_not<void>
+struct _LIBCPP_TEMPLATE_VIS bit_not<void>
{
template <class _Tp>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -978,7 +978,7 @@ struct _LIBCPP_TYPE_VIS_ONLY bit_not<void>
#endif
template <class _Predicate>
-class _LIBCPP_TYPE_VIS_ONLY unary_negate
+class _LIBCPP_TEMPLATE_VIS unary_negate
: public unary_function<typename _Predicate::argument_type, bool>
{
_Predicate __pred_;
@@ -997,7 +997,7 @@ unary_negate<_Predicate>
not1(const _Predicate& __pred) {return unary_negate<_Predicate>(__pred);}
template <class _Predicate>
-class _LIBCPP_TYPE_VIS_ONLY binary_negate
+class _LIBCPP_TEMPLATE_VIS binary_negate
: public binary_function<typename _Predicate::first_argument_type,
typename _Predicate::second_argument_type,
bool>
@@ -1019,7 +1019,7 @@ binary_negate<_Predicate>
not2(const _Predicate& __pred) {return binary_negate<_Predicate>(__pred);}
template <class __Operation>
-class _LIBCPP_TYPE_VIS_ONLY binder1st
+class _LIBCPP_TEMPLATE_VIS binder1st
: public unary_function<typename __Operation::second_argument_type,
typename __Operation::result_type>
{
@@ -1045,7 +1045,7 @@ bind1st(const __Operation& __op, const _Tp& __x)
{return binder1st<__Operation>(__op, __x);}
template <class __Operation>
-class _LIBCPP_TYPE_VIS_ONLY binder2nd
+class _LIBCPP_TEMPLATE_VIS binder2nd
: public unary_function<typename __Operation::first_argument_type,
typename __Operation::result_type>
{
@@ -1071,7 +1071,7 @@ bind2nd(const __Operation& __op, const _Tp& __x)
{return binder2nd<__Operation>(__op, __x);}
template <class _Arg, class _Result>
-class _LIBCPP_TYPE_VIS_ONLY pointer_to_unary_function
+class _LIBCPP_TEMPLATE_VIS pointer_to_unary_function
: public unary_function<_Arg, _Result>
{
_Result (*__f_)(_Arg);
@@ -1089,7 +1089,7 @@ ptr_fun(_Result (*__f)(_Arg))
{return pointer_to_unary_function<_Arg,_Result>(__f);}
template <class _Arg1, class _Arg2, class _Result>
-class _LIBCPP_TYPE_VIS_ONLY pointer_to_binary_function
+class _LIBCPP_TEMPLATE_VIS pointer_to_binary_function
: public binary_function<_Arg1, _Arg2, _Result>
{
_Result (*__f_)(_Arg1, _Arg2);
@@ -1107,7 +1107,7 @@ ptr_fun(_Result (*__f)(_Arg1,_Arg2))
{return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f);}
template<class _Sp, class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY mem_fun_t : public unary_function<_Tp*, _Sp>
+class _LIBCPP_TEMPLATE_VIS mem_fun_t : public unary_function<_Tp*, _Sp>
{
_Sp (_Tp::*__p_)();
public:
@@ -1118,7 +1118,7 @@ public:
};
template<class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TYPE_VIS_ONLY mem_fun1_t : public binary_function<_Tp*, _Ap, _Sp>
+class _LIBCPP_TEMPLATE_VIS mem_fun1_t : public binary_function<_Tp*, _Ap, _Sp>
{
_Sp (_Tp::*__p_)(_Ap);
public:
@@ -1141,7 +1141,7 @@ mem_fun(_Sp (_Tp::*__f)(_Ap))
{return mem_fun1_t<_Sp,_Tp,_Ap>(__f);}
template<class _Sp, class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY mem_fun_ref_t : public unary_function<_Tp, _Sp>
+class _LIBCPP_TEMPLATE_VIS mem_fun_ref_t : public unary_function<_Tp, _Sp>
{
_Sp (_Tp::*__p_)();
public:
@@ -1152,7 +1152,7 @@ public:
};
template<class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TYPE_VIS_ONLY mem_fun1_ref_t : public binary_function<_Tp, _Ap, _Sp>
+class _LIBCPP_TEMPLATE_VIS mem_fun1_ref_t : public binary_function<_Tp, _Ap, _Sp>
{
_Sp (_Tp::*__p_)(_Ap);
public:
@@ -1175,7 +1175,7 @@ mem_fun_ref(_Sp (_Tp::*__f)(_Ap))
{return mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}
template <class _Sp, class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY const_mem_fun_t : public unary_function<const _Tp*, _Sp>
+class _LIBCPP_TEMPLATE_VIS const_mem_fun_t : public unary_function<const _Tp*, _Sp>
{
_Sp (_Tp::*__p_)() const;
public:
@@ -1186,7 +1186,7 @@ public:
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TYPE_VIS_ONLY const_mem_fun1_t : public binary_function<const _Tp*, _Ap, _Sp>
+class _LIBCPP_TEMPLATE_VIS const_mem_fun1_t : public binary_function<const _Tp*, _Ap, _Sp>
{
_Sp (_Tp::*__p_)(_Ap) const;
public:
@@ -1209,7 +1209,7 @@ mem_fun(_Sp (_Tp::*__f)(_Ap) const)
{return const_mem_fun1_t<_Sp,_Tp,_Ap>(__f);}
template <class _Sp, class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY const_mem_fun_ref_t : public unary_function<_Tp, _Sp>
+class _LIBCPP_TEMPLATE_VIS const_mem_fun_ref_t : public unary_function<_Tp, _Sp>
{
_Sp (_Tp::*__p_)() const;
public:
@@ -1220,7 +1220,7 @@ public:
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TYPE_VIS_ONLY const_mem_fun1_ref_t
+class _LIBCPP_TEMPLATE_VIS const_mem_fun1_ref_t
: public binary_function<_Tp, _Ap, _Sp>
{
_Sp (_Tp::*__p_)(_Ap) const;
@@ -1399,7 +1399,7 @@ void __throw_bad_function_call()
#endif
}
-template<class _Fp> class _LIBCPP_TYPE_VIS_ONLY function; // undefined
+template<class _Fp> class _LIBCPP_TEMPLATE_VIS function; // undefined
namespace __function
{
@@ -1575,7 +1575,7 @@ __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target_type() const _NOEXCEPT
} // __function
template<class _Rp, class ..._ArgTypes>
-class _LIBCPP_TYPE_VIS_ONLY function<_Rp(_ArgTypes...)>
+class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
: public __function::__maybe_derive_from_unary_function<_Rp(_ArgTypes...)>,
public __function::__maybe_derive_from_binary_function<_Rp(_ArgTypes...)>
{
@@ -1984,7 +1984,7 @@ swap(function<_Rp(_ArgTypes...)>& __x, function<_Rp(_ArgTypes...)>& __y) _NOEXCE
//==============================================================================
template<class _Tp> struct __is_bind_expression : public false_type {};
-template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_bind_expression
+template<class _Tp> struct _LIBCPP_TEMPLATE_VIS is_bind_expression
: public __is_bind_expression<typename remove_cv<_Tp>::type> {};
#if _LIBCPP_STD_VER > 14
@@ -1993,7 +1993,7 @@ constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value;
#endif
template<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {};
-template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_placeholder
+template<class _Tp> struct _LIBCPP_TEMPLATE_VIS is_placeholder
: public __is_placeholder<typename remove_cv<_Tp>::type> {};
#if _LIBCPP_STD_VER > 14
@@ -2340,7 +2340,7 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args)
#endif // _LIBCPP_HAS_NO_VARIADICS
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<bool>
+struct _LIBCPP_TEMPLATE_VIS hash<bool>
: public unary_function<bool, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2348,7 +2348,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<bool>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<char>
+struct _LIBCPP_TEMPLATE_VIS hash<char>
: public unary_function<char, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2356,7 +2356,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<char>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<signed char>
+struct _LIBCPP_TEMPLATE_VIS hash<signed char>
: public unary_function<signed char, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2364,7 +2364,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<signed char>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned char>
+struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
: public unary_function<unsigned char, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2374,7 +2374,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned char>
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<char16_t>
+struct _LIBCPP_TEMPLATE_VIS hash<char16_t>
: public unary_function<char16_t, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2382,7 +2382,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<char16_t>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<char32_t>
+struct _LIBCPP_TEMPLATE_VIS hash<char32_t>
: public unary_function<char32_t, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2392,7 +2392,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<char32_t>
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<wchar_t>
+struct _LIBCPP_TEMPLATE_VIS hash<wchar_t>
: public unary_function<wchar_t, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2400,7 +2400,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<wchar_t>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<short>
+struct _LIBCPP_TEMPLATE_VIS hash<short>
: public unary_function<short, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2408,7 +2408,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<short>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned short>
+struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
: public unary_function<unsigned short, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2416,7 +2416,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned short>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<int>
+struct _LIBCPP_TEMPLATE_VIS hash<int>
: public unary_function<int, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2424,7 +2424,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<int>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned int>
+struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
: public unary_function<unsigned int, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2432,7 +2432,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned int>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<long>
+struct _LIBCPP_TEMPLATE_VIS hash<long>
: public unary_function<long, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2440,7 +2440,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<long>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned long>
+struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
: public unary_function<unsigned long, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2448,13 +2448,13 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned long>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<long long>
+struct _LIBCPP_TEMPLATE_VIS hash<long long>
: public __scalar_hash<long long>
{
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned long long>
+struct _LIBCPP_TEMPLATE_VIS hash<unsigned long long>
: public __scalar_hash<unsigned long long>
{
};
@@ -2462,13 +2462,13 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<unsigned long long>
#ifndef _LIBCPP_HAS_NO_INT128
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<__int128_t>
+struct _LIBCPP_TEMPLATE_VIS hash<__int128_t>
: public __scalar_hash<__int128_t>
{
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<__uint128_t>
+struct _LIBCPP_TEMPLATE_VIS hash<__uint128_t>
: public __scalar_hash<__uint128_t>
{
};
@@ -2476,7 +2476,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<__uint128_t>
#endif
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<float>
+struct _LIBCPP_TEMPLATE_VIS hash<float>
: public __scalar_hash<float>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2490,7 +2490,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<float>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<double>
+struct _LIBCPP_TEMPLATE_VIS hash<double>
: public __scalar_hash<double>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2504,7 +2504,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<double>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<long double>
+struct _LIBCPP_TEMPLATE_VIS hash<long double>
: public __scalar_hash<long double>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2556,7 +2556,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<long double>
#if _LIBCPP_STD_VER > 11
template <class _Tp, bool = is_enum<_Tp>::value>
-struct _LIBCPP_TYPE_VIS_ONLY __enum_hash
+struct _LIBCPP_TEMPLATE_VIS __enum_hash
: public unary_function<_Tp, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -2567,14 +2567,14 @@ struct _LIBCPP_TYPE_VIS_ONLY __enum_hash
}
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY __enum_hash<_Tp, false> {
+struct _LIBCPP_TEMPLATE_VIS __enum_hash<_Tp, false> {
__enum_hash() = delete;
__enum_hash(__enum_hash const&) = delete;
__enum_hash& operator=(__enum_hash const&) = delete;
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY hash : public __enum_hash<_Tp>
+struct _LIBCPP_TEMPLATE_VIS hash : public __enum_hash<_Tp>
{
};
#endif
@@ -2593,7 +2593,7 @@ invoke(_Fn&& __f, _Args&&... __args)
}
template <class _DecayFunc>
-class _LIBCPP_TYPE_VIS_ONLY __not_fn_imp {
+class _LIBCPP_TEMPLATE_VIS __not_fn_imp {
_DecayFunc __fd;
public:
diff --git a/include/future b/include/future
index d1d42f6a7274..48550a37e70e 100644
--- a/include/future
+++ b/include/future
@@ -391,11 +391,11 @@ _LIBCPP_DECLARE_STRONG_ENUM(future_errc)
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(future_errc)
template <>
-struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum<future_errc> : public true_type {};
+struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<future_errc> : public true_type {};
#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
template <>
-struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum<future_errc::__lx> : public true_type { };
+struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<future_errc::__lx> : public true_type { };
#endif
//enum class launch
@@ -1051,12 +1051,12 @@ __async_assoc_state<void, _Fp>::__on_zero_shared() _NOEXCEPT
base::__on_zero_shared();
}
-template <class _Rp> class _LIBCPP_TYPE_VIS_ONLY promise;
-template <class _Rp> class _LIBCPP_TYPE_VIS_ONLY shared_future;
+template <class _Rp> class _LIBCPP_TEMPLATE_VIS promise;
+template <class _Rp> class _LIBCPP_TEMPLATE_VIS shared_future;
// future
-template <class _Rp> class _LIBCPP_TYPE_VIS_ONLY future;
+template <class _Rp> class _LIBCPP_TEMPLATE_VIS future;
template <class _Rp, class _Fp>
future<_Rp>
@@ -1075,7 +1075,7 @@ __make_async_assoc_state(_Fp __f);
#endif
template <class _Rp>
-class _LIBCPP_TYPE_VIS_ONLY future
+class _LIBCPP_TEMPLATE_VIS future
{
__assoc_state<_Rp>* __state_;
@@ -1178,7 +1178,7 @@ future<_Rp>::get()
}
template <class _Rp>
-class _LIBCPP_TYPE_VIS_ONLY future<_Rp&>
+class _LIBCPP_TEMPLATE_VIS future<_Rp&>
{
__assoc_state<_Rp&>* __state_;
@@ -1359,7 +1359,7 @@ swap(future<_Rp>& __x, future<_Rp>& __y) _NOEXCEPT
template <class _Callable> class packaged_task;
template <class _Rp>
-class _LIBCPP_TYPE_VIS_ONLY promise
+class _LIBCPP_TEMPLATE_VIS promise
{
__assoc_state<_Rp>* __state_;
@@ -1526,7 +1526,7 @@ promise<_Rp>::set_exception_at_thread_exit(exception_ptr __p)
// promise<R&>
template <class _Rp>
-class _LIBCPP_TYPE_VIS_ONLY promise<_Rp&>
+class _LIBCPP_TEMPLATE_VIS promise<_Rp&>
{
__assoc_state<_Rp&>* __state_;
@@ -1737,7 +1737,7 @@ swap(promise<_Rp>& __x, promise<_Rp>& __y) _NOEXCEPT
}
template <class _Rp, class _Alloc>
- struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<promise<_Rp>, _Alloc>
+ struct _LIBCPP_TEMPLATE_VIS uses_allocator<promise<_Rp>, _Alloc>
: public true_type {};
#ifndef _LIBCPP_HAS_NO_VARIADICS
@@ -1998,7 +1998,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __arg) cons
}
template<class _Rp, class ..._ArgTypes>
-class _LIBCPP_TYPE_VIS_ONLY packaged_task<_Rp(_ArgTypes...)>
+class _LIBCPP_TEMPLATE_VIS packaged_task<_Rp(_ArgTypes...)>
{
public:
typedef _Rp result_type; // extension
@@ -2127,7 +2127,7 @@ packaged_task<_Rp(_ArgTypes...)>::reset()
}
template<class ..._ArgTypes>
-class _LIBCPP_TYPE_VIS_ONLY packaged_task<void(_ArgTypes...)>
+class _LIBCPP_TEMPLATE_VIS packaged_task<void(_ArgTypes...)>
{
public:
typedef void result_type; // extension
@@ -2266,7 +2266,7 @@ swap(packaged_task<_Callable>& __x, packaged_task<_Callable>& __y) _NOEXCEPT
}
template <class _Callable, class _Alloc>
-struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<packaged_task<_Callable>, _Alloc>
+struct _LIBCPP_TEMPLATE_VIS uses_allocator<packaged_task<_Callable>, _Alloc>
: public true_type {};
template <class _Rp, class _Fp>
@@ -2367,7 +2367,7 @@ async(_Fp&& __f, _Args&&... __args)
// shared_future
template <class _Rp>
-class _LIBCPP_TYPE_VIS_ONLY shared_future
+class _LIBCPP_TEMPLATE_VIS shared_future
{
__assoc_state<_Rp>* __state_;
@@ -2441,7 +2441,7 @@ shared_future<_Rp>::operator=(const shared_future& __rhs) _NOEXCEPT
}
template <class _Rp>
-class _LIBCPP_TYPE_VIS_ONLY shared_future<_Rp&>
+class _LIBCPP_TEMPLATE_VIS shared_future<_Rp&>
{
__assoc_state<_Rp&>* __state_;
diff --git a/include/initializer_list b/include/initializer_list
index 663e49b6ee43..d6dfa80817a5 100644
--- a/include/initializer_list
+++ b/include/initializer_list
@@ -56,7 +56,7 @@ namespace std // purposefully not versioned
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template<class _Ep>
-class _LIBCPP_TYPE_VIS_ONLY initializer_list
+class _LIBCPP_TEMPLATE_VIS initializer_list
{
const _Ep* __begin_;
size_t __size_;
diff --git a/include/ios b/include/ios
index ea83822ac169..efee39fb533a 100644
--- a/include/ios
+++ b/include/ios
@@ -393,11 +393,11 @@ _LIBCPP_DECLARE_STRONG_ENUM(io_errc)
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(io_errc)
template <>
-struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum<io_errc> : public true_type { };
+struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc> : public true_type { };
#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
template <>
-struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum<io_errc::__lx> : public true_type { };
+struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc::__lx> : public true_type { };
#endif
_LIBCPP_FUNC_VIS
@@ -573,7 +573,7 @@ ios_base::exceptions(iostate __iostate)
}
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_ios
+class _LIBCPP_TEMPLATE_VIS basic_ios
: public ios_base
{
public:
diff --git a/include/iosfwd b/include/iosfwd
index e4149ef22378..d4384859e418 100644
--- a/include/iosfwd
+++ b/include/iosfwd
@@ -97,47 +97,47 @@ _LIBCPP_BEGIN_NAMESPACE_STD
class _LIBCPP_TYPE_VIS ios_base;
-template<class _CharT> struct _LIBCPP_TYPE_VIS_ONLY char_traits;
-template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY allocator;
+template<class _CharT> struct _LIBCPP_TEMPLATE_VIS char_traits;
+template<class _Tp> class _LIBCPP_TEMPLATE_VIS allocator;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_ios;
+ class _LIBCPP_TEMPLATE_VIS basic_ios;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_streambuf;
+ class _LIBCPP_TEMPLATE_VIS basic_streambuf;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_istream;
+ class _LIBCPP_TEMPLATE_VIS basic_istream;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_ostream;
+ class _LIBCPP_TEMPLATE_VIS basic_ostream;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_iostream;
+ class _LIBCPP_TEMPLATE_VIS basic_iostream;
template <class _CharT, class _Traits = char_traits<_CharT>,
class _Allocator = allocator<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_stringbuf;
+ class _LIBCPP_TEMPLATE_VIS basic_stringbuf;
template <class _CharT, class _Traits = char_traits<_CharT>,
class _Allocator = allocator<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_istringstream;
+ class _LIBCPP_TEMPLATE_VIS basic_istringstream;
template <class _CharT, class _Traits = char_traits<_CharT>,
class _Allocator = allocator<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_ostringstream;
+ class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
template <class _CharT, class _Traits = char_traits<_CharT>,
class _Allocator = allocator<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_stringstream;
+ class _LIBCPP_TEMPLATE_VIS basic_stringstream;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_filebuf;
+ class _LIBCPP_TEMPLATE_VIS basic_filebuf;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_ifstream;
+ class _LIBCPP_TEMPLATE_VIS basic_ifstream;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_ofstream;
+ class _LIBCPP_TEMPLATE_VIS basic_ofstream;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_fstream;
+ class _LIBCPP_TEMPLATE_VIS basic_fstream;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY istreambuf_iterator;
+ class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
template <class _CharT, class _Traits = char_traits<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY ostreambuf_iterator;
+ class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator;
typedef basic_ios<char> ios;
typedef basic_ios<wchar_t> wios;
@@ -172,7 +172,7 @@ typedef basic_ifstream<wchar_t> wifstream;
typedef basic_ofstream<wchar_t> wofstream;
typedef basic_fstream<wchar_t> wfstream;
-template <class _State> class _LIBCPP_TYPE_VIS_ONLY fpos;
+template <class _State> class _LIBCPP_TEMPLATE_VIS fpos;
typedef fpos<mbstate_t> streampos;
typedef fpos<mbstate_t> wstreampos;
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
@@ -190,14 +190,14 @@ typedef long long streamoff; // for char_traits in <string>
template <class _CharT, // for <stdexcept>
class _Traits = char_traits<_CharT>,
class _Allocator = allocator<_CharT> >
- class _LIBCPP_TYPE_VIS_ONLY basic_string;
+ class _LIBCPP_TEMPLATE_VIS basic_string;
typedef basic_string<char, char_traits<char>, allocator<char> > string;
typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
// Include other forward declarations here
template <class _Tp, class _Alloc = allocator<_Tp> >
-class _LIBCPP_TYPE_VIS_ONLY vector;
+class _LIBCPP_TEMPLATE_VIS vector;
_LIBCPP_END_NAMESPACE_STD
diff --git a/include/istream b/include/istream
index 04845a24341e..e935f519f416 100644
--- a/include/istream
+++ b/include/istream
@@ -171,7 +171,7 @@ template <class charT, class traits, class T>
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_istream
+class _LIBCPP_TEMPLATE_VIS basic_istream
: virtual public basic_ios<_CharT, _Traits>
{
streamsize __gc_;
@@ -217,7 +217,7 @@ protected:
public:
// 27.7.1.1.3 Prefix/suffix:
- class _LIBCPP_TYPE_VIS_ONLY sentry;
+ class _LIBCPP_TEMPLATE_VIS sentry;
// 27.7.1.2 Formatted input:
inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
@@ -294,7 +294,7 @@ public:
};
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_istream<_CharT, _Traits>::sentry
+class _LIBCPP_TEMPLATE_VIS basic_istream<_CharT, _Traits>::sentry
{
bool __ok_;
@@ -1443,7 +1443,7 @@ operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp&& __x)
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_iostream
+class _LIBCPP_TEMPLATE_VIS basic_iostream
: public basic_istream<_CharT, _Traits>,
public basic_ostream<_CharT, _Traits>
{
diff --git a/include/iterator b/include/iterator
index 797ec5332e39..b8f657085c6b 100644
--- a/include/iterator
+++ b/include/iterator
@@ -431,11 +431,11 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
_LIBCPP_BEGIN_NAMESPACE_STD
-struct _LIBCPP_TYPE_VIS_ONLY input_iterator_tag {};
-struct _LIBCPP_TYPE_VIS_ONLY output_iterator_tag {};
-struct _LIBCPP_TYPE_VIS_ONLY forward_iterator_tag : public input_iterator_tag {};
-struct _LIBCPP_TYPE_VIS_ONLY bidirectional_iterator_tag : public forward_iterator_tag {};
-struct _LIBCPP_TYPE_VIS_ONLY random_access_iterator_tag : public bidirectional_iterator_tag {};
+struct _LIBCPP_TEMPLATE_VIS input_iterator_tag {};
+struct _LIBCPP_TEMPLATE_VIS output_iterator_tag {};
+struct _LIBCPP_TEMPLATE_VIS forward_iterator_tag : public input_iterator_tag {};
+struct _LIBCPP_TEMPLATE_VIS bidirectional_iterator_tag : public forward_iterator_tag {};
+struct _LIBCPP_TEMPLATE_VIS random_access_iterator_tag : public bidirectional_iterator_tag {};
template <class _Tp>
struct __has_iterator_category
@@ -478,11 +478,11 @@ struct __iterator_traits<_Iter, true>
// the client expects instead of failing at compile time.
template <class _Iter>
-struct _LIBCPP_TYPE_VIS_ONLY iterator_traits
+struct _LIBCPP_TEMPLATE_VIS iterator_traits
: __iterator_traits<_Iter, __has_iterator_category<_Iter>::value> {};
template<class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY iterator_traits<_Tp*>
+struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*>
{
typedef ptrdiff_t difference_type;
typedef typename remove_const<_Tp>::type value_type;
@@ -519,7 +519,7 @@ struct __is_exactly_input_iterator
template<class _Category, class _Tp, class _Distance = ptrdiff_t,
class _Pointer = _Tp*, class _Reference = _Tp&>
-struct _LIBCPP_TYPE_VIS_ONLY iterator
+struct _LIBCPP_TEMPLATE_VIS iterator
{
typedef _Tp value_type;
typedef _Distance difference_type;
@@ -616,7 +616,7 @@ prev(_BidiretionalIter __x,
}
template <class _Iter>
-class _LIBCPP_TYPE_VIS_ONLY reverse_iterator
+class _LIBCPP_TEMPLATE_VIS reverse_iterator
: public iterator<typename iterator_traits<_Iter>::iterator_category,
typename iterator_traits<_Iter>::value_type,
typename iterator_traits<_Iter>::difference_type,
@@ -755,7 +755,7 @@ reverse_iterator<_Iter> make_reverse_iterator(_Iter __i)
#endif
template <class _Container>
-class _LIBCPP_TYPE_VIS_ONLY back_insert_iterator
+class _LIBCPP_TEMPLATE_VIS back_insert_iterator
: public iterator<output_iterator_tag,
void,
void,
@@ -788,7 +788,7 @@ back_inserter(_Container& __x)
}
template <class _Container>
-class _LIBCPP_TYPE_VIS_ONLY front_insert_iterator
+class _LIBCPP_TEMPLATE_VIS front_insert_iterator
: public iterator<output_iterator_tag,
void,
void,
@@ -821,7 +821,7 @@ front_inserter(_Container& __x)
}
template <class _Container>
-class _LIBCPP_TYPE_VIS_ONLY insert_iterator
+class _LIBCPP_TEMPLATE_VIS insert_iterator
: public iterator<output_iterator_tag,
void,
void,
@@ -857,7 +857,7 @@ inserter(_Container& __x, typename _Container::iterator __i)
template <class _Tp, class _CharT = char,
class _Traits = char_traits<_CharT>, class _Distance = ptrdiff_t>
-class _LIBCPP_TYPE_VIS_ONLY istream_iterator
+class _LIBCPP_TEMPLATE_VIS istream_iterator
: public iterator<input_iterator_tag, _Tp, _Distance, const _Tp*, const _Tp&>
{
public:
@@ -896,7 +896,7 @@ public:
};
template <class _Tp, class _CharT = char, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY ostream_iterator
+class _LIBCPP_TEMPLATE_VIS ostream_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
public:
@@ -925,7 +925,7 @@ public:
};
template<class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY istreambuf_iterator
+class _LIBCPP_TEMPLATE_VIS istreambuf_iterator
: public iterator<input_iterator_tag, _CharT,
typename _Traits::off_type, _CharT*,
_CharT>
@@ -996,7 +996,7 @@ bool operator!=(const istreambuf_iterator<_CharT,_Traits>& __a,
{return !__a.equal(__b);}
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY ostreambuf_iterator
+class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
public:
@@ -1037,7 +1037,7 @@ public:
};
template <class _Iter>
-class _LIBCPP_TYPE_VIS_ONLY move_iterator
+class _LIBCPP_TEMPLATE_VIS move_iterator
{
private:
_Iter __i;
@@ -1383,7 +1383,7 @@ private:
template <class _Up> friend class __wrap_iter;
template <class _CharT, class _Traits, class _Alloc> friend class basic_string;
- template <class _Tp, class _Alloc> friend class _LIBCPP_TYPE_VIS_ONLY vector;
+ template <class _Tp, class _Alloc> friend class _LIBCPP_TEMPLATE_VIS vector;
template <class _Iter1, class _Iter2>
friend
diff --git a/include/limits b/include/limits
index 4e67a7b63d56..b15f8f1b6a5e 100644
--- a/include/limits
+++ b/include/limits
@@ -438,7 +438,7 @@ protected:
};
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY numeric_limits
+class _LIBCPP_TEMPLATE_VIS numeric_limits
: private __libcpp_numeric_limits<typename remove_cv<_Tp>::type>
{
typedef __libcpp_numeric_limits<typename remove_cv<_Tp>::type> __base;
@@ -531,7 +531,7 @@ template <class _Tp>
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style;
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY numeric_limits<const _Tp>
+class _LIBCPP_TEMPLATE_VIS numeric_limits<const _Tp>
: private numeric_limits<_Tp>
{
typedef numeric_limits<_Tp> __base;
@@ -624,7 +624,7 @@ template <class _Tp>
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style;
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY numeric_limits<volatile _Tp>
+class _LIBCPP_TEMPLATE_VIS numeric_limits<volatile _Tp>
: private numeric_limits<_Tp>
{
typedef numeric_limits<_Tp> __base;
@@ -717,7 +717,7 @@ template <class _Tp>
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style;
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY numeric_limits<const volatile _Tp>
+class _LIBCPP_TEMPLATE_VIS numeric_limits<const volatile _Tp>
: private numeric_limits<_Tp>
{
typedef numeric_limits<_Tp> __base;
diff --git a/include/list b/include/list
index 6b96fbfc57e0..76c50a156093 100644
--- a/include/list
+++ b/include/list
@@ -266,12 +266,12 @@ struct __list_node
}
};
-template <class _Tp, class _Alloc = allocator<_Tp> > class _LIBCPP_TYPE_VIS_ONLY list;
+template <class _Tp, class _Alloc = allocator<_Tp> > class _LIBCPP_TEMPLATE_VIS list;
template <class _Tp, class _Alloc> class __list_imp;
-template <class _Tp, class _VoidPtr> class _LIBCPP_TYPE_VIS_ONLY __list_const_iterator;
+template <class _Tp, class _VoidPtr> class _LIBCPP_TEMPLATE_VIS __list_const_iterator;
template <class _Tp, class _VoidPtr>
-class _LIBCPP_TYPE_VIS_ONLY __list_iterator
+class _LIBCPP_TEMPLATE_VIS __list_iterator
{
typedef __list_node_pointer_traits<_Tp, _VoidPtr> _NodeTraits;
typedef typename _NodeTraits::__link_pointer __link_pointer;
@@ -394,7 +394,7 @@ public:
};
template <class _Tp, class _VoidPtr>
-class _LIBCPP_TYPE_VIS_ONLY __list_const_iterator
+class _LIBCPP_TEMPLATE_VIS __list_const_iterator
{
typedef __list_node_pointer_traits<_Tp, _VoidPtr> _NodeTraits;
typedef typename _NodeTraits::__link_pointer __link_pointer;
@@ -800,7 +800,7 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
}
template <class _Tp, class _Alloc /*= allocator<_Tp>*/>
-class _LIBCPP_TYPE_VIS_ONLY list
+class _LIBCPP_TEMPLATE_VIS list
: private __list_imp<_Tp, _Alloc>
{
typedef __list_imp<_Tp, _Alloc> base;
diff --git a/include/locale b/include/locale
index a567085f68f4..9cef429686ef 100644
--- a/include/locale
+++ b/include/locale
@@ -527,7 +527,7 @@ _LIBCPP_EXTERN_TEMPLATE2(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<char>
_LIBCPP_EXTERN_TEMPLATE2(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<wchar_t>)
template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY num_get
+class _LIBCPP_TEMPLATE_VIS num_get
: public locale::facet,
private __num_get<_CharT>
{
@@ -1197,7 +1197,7 @@ _LIBCPP_EXTERN_TEMPLATE2(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<char>
_LIBCPP_EXTERN_TEMPLATE2(struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<wchar_t>)
template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY num_put
+class _LIBCPP_TEMPLATE_VIS num_put
: public locale::facet,
private __num_put<_CharT>
{
@@ -1665,7 +1665,7 @@ public:
};
template <class _CharT>
-class _LIBCPP_TYPE_VIS_ONLY __time_get_c_storage
+class _LIBCPP_TEMPLATE_VIS __time_get_c_storage
{
protected:
typedef basic_string<_CharT> string_type;
@@ -1683,7 +1683,7 @@ protected:
};
template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY time_get
+class _LIBCPP_TEMPLATE_VIS time_get
: public locale::facet,
public time_base,
private __time_get_c_storage<_CharT>
@@ -2306,7 +2306,7 @@ protected:
};
template <class _CharT>
-class _LIBCPP_TYPE_VIS_ONLY __time_get_storage
+class _LIBCPP_TEMPLATE_VIS __time_get_storage
: public __time_get
{
protected:
@@ -2333,7 +2333,7 @@ private:
};
template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY time_get_byname
+class _LIBCPP_TEMPLATE_VIS time_get_byname
: public time_get<_CharT, _InputIterator>,
private __time_get_storage<_CharT>
{
@@ -2393,7 +2393,7 @@ protected:
};
template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY time_put
+class _LIBCPP_TEMPLATE_VIS time_put
: public locale::facet,
private __time_put
{
@@ -2492,7 +2492,7 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<char>)
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<wchar_t>)
template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY time_put_byname
+class _LIBCPP_TEMPLATE_VIS time_put_byname
: public time_put<_CharT, _OutputIterator>
{
public:
@@ -2526,7 +2526,7 @@ public:
// moneypunct
template <class _CharT, bool _International = false>
-class _LIBCPP_TYPE_VIS_ONLY moneypunct
+class _LIBCPP_TEMPLATE_VIS moneypunct
: public locale::facet,
public money_base
{
@@ -2584,7 +2584,7 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar
// moneypunct_byname
template <class _CharT, bool _International = false>
-class _LIBCPP_TYPE_VIS_ONLY moneypunct_byname
+class _LIBCPP_TEMPLATE_VIS moneypunct_byname
: public moneypunct<_CharT, _International>
{
public:
@@ -2696,7 +2696,7 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<char
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<wchar_t>)
template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY money_get
+class _LIBCPP_TEMPLATE_VIS money_get
: public locale::facet,
private __money_get<_CharT>
{
@@ -3254,7 +3254,7 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<char
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<wchar_t>)
template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY money_put
+class _LIBCPP_TEMPLATE_VIS money_put
: public locale::facet,
private __money_put<_CharT>
{
@@ -3417,7 +3417,7 @@ public:
};
template <class _CharT>
-class _LIBCPP_TYPE_VIS_ONLY messages
+class _LIBCPP_TEMPLATE_VIS messages
: public locale::facet,
public messages_base
{
@@ -3517,7 +3517,7 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<char>)
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<wchar_t>)
template <class _CharT>
-class _LIBCPP_TYPE_VIS_ONLY messages_byname
+class _LIBCPP_TEMPLATE_VIS messages_byname
: public messages<_CharT>
{
public:
@@ -3543,7 +3543,7 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<
template<class _Codecvt, class _Elem = wchar_t,
class _Wide_alloc = allocator<_Elem>,
class _Byte_alloc = allocator<char> >
-class _LIBCPP_TYPE_VIS_ONLY wstring_convert
+class _LIBCPP_TEMPLATE_VIS wstring_convert
{
public:
typedef basic_string<char, char_traits<char>, _Byte_alloc> byte_string;
@@ -3799,7 +3799,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
}
template <class _Codecvt, class _Elem = wchar_t, class _Tr = char_traits<_Elem> >
-class _LIBCPP_TYPE_VIS_ONLY wbuffer_convert
+class _LIBCPP_TEMPLATE_VIS wbuffer_convert
: public basic_streambuf<_Elem, _Tr>
{
public:
diff --git a/include/map b/include/map
index bdde949bc1e9..9555aadd2956 100644
--- a/include/map
+++ b/include/map
@@ -533,7 +533,7 @@ public:
using _VSTD::swap;
swap(comp, __y.comp);
}
-
+
#if _LIBCPP_STD_VER > 11
template <typename _K2>
_LIBCPP_INLINE_VISIBILITY
@@ -682,7 +682,7 @@ struct __extract_key_value_types<__value_type<_Key, _Tp> >
};
template <class _TreeIterator>
-class _LIBCPP_TYPE_VIS_ONLY __map_iterator
+class _LIBCPP_TEMPLATE_VIS __map_iterator
{
typedef typename _TreeIterator::_NodeTypes _NodeTypes;
typedef typename _TreeIterator::__pointer_traits __pointer_traits;
@@ -730,18 +730,18 @@ public:
friend _LIBCPP_INLINE_VISIBILITY
bool operator==(const __map_iterator& __x, const __map_iterator& __y)
{return __x.__i_ == __y.__i_;}
- friend
+ friend
_LIBCPP_INLINE_VISIBILITY
bool operator!=(const __map_iterator& __x, const __map_iterator& __y)
{return __x.__i_ != __y.__i_;}
- template <class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY map;
- template <class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY multimap;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __map_const_iterator;
+ template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
+ template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
};
template <class _TreeIterator>
-class _LIBCPP_TYPE_VIS_ONLY __map_const_iterator
+class _LIBCPP_TEMPLATE_VIS __map_const_iterator
{
typedef typename _TreeIterator::_NodeTypes _NodeTypes;
typedef typename _TreeIterator::__pointer_traits __pointer_traits;
@@ -797,14 +797,14 @@ public:
bool operator!=(const __map_const_iterator& __x, const __map_const_iterator& __y)
{return __x.__i_ != __y.__i_;}
- template <class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY map;
- template <class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY multimap;
- template <class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY __tree_const_iterator;
+ template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
+ template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
+ template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
};
template <class _Key, class _Tp, class _Compare = less<_Key>,
class _Allocator = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TYPE_VIS_ONLY map
+class _LIBCPP_TEMPLATE_VIS map
{
public:
// types:
@@ -820,7 +820,7 @@ public:
static_assert((is_same<typename allocator_type::value_type, value_type>::value),
"Allocator::value_type must be same type as value_type");
- class _LIBCPP_TYPE_VIS_ONLY value_compare
+ class _LIBCPP_TEMPLATE_VIS value_compare
: public binary_function<value_type, value_type, bool>
{
friend class map;
@@ -895,7 +895,7 @@ public:
#if _LIBCPP_STD_VER > 11
template <class _InputIterator>
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY
map(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
: map(__f, __l, key_compare(), __a) {}
#endif
@@ -961,7 +961,7 @@ public:
}
#if _LIBCPP_STD_VER > 11
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY
map(initializer_list<value_type> __il, const allocator_type& __a)
: map(__il, key_compare(), __a) {}
#endif
@@ -1297,6 +1297,7 @@ private:
typedef typename __base::__node_allocator __node_allocator;
typedef typename __base::__node_pointer __node_pointer;
typedef typename __base::__node_base_pointer __node_base_pointer;
+ typedef typename __base::__parent_pointer __parent_pointer;
typedef __map_node_destructor<__node_allocator> _Dp;
typedef unique_ptr<__node, _Dp> __node_holder;
@@ -1304,65 +1305,9 @@ private:
#ifdef _LIBCPP_CXX03_LANG
__node_holder __construct_node_with_key(const key_type& __k);
#endif
-
- __node_base_pointer const&
- __find_equal_key(__node_base_pointer& __parent, const key_type& __k) const;
-
- _LIBCPP_INLINE_VISIBILITY
- __node_base_pointer&
- __find_equal_key(__node_base_pointer& __parent, const key_type& __k) {
- map const* __const_this = this;
- return const_cast<__node_base_pointer&>(
- __const_this->__find_equal_key(__parent, __k));
- }
};
-// Find __k
-// Set __parent to parent of null leaf and
-// return reference to null leaf iv __k does not exist.
-// If __k exists, set parent to node of __k and return reference to node of __k
-template <class _Key, class _Tp, class _Compare, class _Allocator>
-typename map<_Key, _Tp, _Compare, _Allocator>::__node_base_pointer const&
-map<_Key, _Tp, _Compare, _Allocator>::__find_equal_key(__node_base_pointer& __parent,
- const key_type& __k) const
-{
- __node_pointer __nd = __tree_.__root();
- if (__nd != nullptr)
- {
- while (true)
- {
- if (__tree_.value_comp().key_comp()(__k, __nd->__value_.__cc.first))
- {
- if (__nd->__left_ != nullptr)
- __nd = static_cast<__node_pointer>(__nd->__left_);
- else
- {
- __parent = static_cast<__node_base_pointer>(__nd);
- return __parent->__left_;
- }
- }
- else if (__tree_.value_comp().key_comp()(__nd->__value_.__cc.first, __k))
- {
- if (__nd->__right_ != nullptr)
- __nd = static_cast<__node_pointer>(__nd->__right_);
- else
- {
- __parent = static_cast<__node_base_pointer>(__nd);
- return __parent->__right_;
- }
- }
- else
- {
- __parent = static_cast<__node_base_pointer>(__nd);
- return __parent;
- }
- }
- }
- __parent = static_cast<__node_base_pointer>(__tree_.__end_node());
- return __parent->__left_;
-}
-
#ifndef _LIBCPP_CXX03_LANG
template <class _Key, class _Tp, class _Compare, class _Allocator>
@@ -1400,8 +1345,8 @@ template <class _Key, class _Tp, class _Compare, class _Allocator>
_Tp&
map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k)
{
- __node_base_pointer __parent;
- __node_base_pointer& __child = __find_equal_key(__parent, __k);
+ __parent_pointer __parent;
+ __node_base_pointer& __child = __tree_.__find_equal(__parent, __k);
__node_pointer __r = static_cast<__node_pointer>(__child);
if (__child == nullptr)
{
@@ -1440,8 +1385,8 @@ template <class _Key, class _Tp, class _Compare, class _Allocator>
_Tp&
map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k)
{
- __node_base_pointer __parent;
- __node_base_pointer& __child = __find_equal_key(__parent, __k);
+ __parent_pointer __parent;
+ __node_base_pointer& __child = __tree_.__find_equal(__parent, __k);
#ifndef _LIBCPP_NO_EXCEPTIONS
if (__child == nullptr)
throw out_of_range("map::at: key not found");
@@ -1453,8 +1398,8 @@ template <class _Key, class _Tp, class _Compare, class _Allocator>
const _Tp&
map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) const
{
- __node_base_pointer __parent;
- __node_base_pointer __child = __find_equal_key(__parent, __k);
+ __parent_pointer __parent;
+ __node_base_pointer __child = __tree_.__find_equal(__parent, __k);
#ifndef _LIBCPP_NO_EXCEPTIONS
if (__child == nullptr)
throw out_of_range("map::at: key not found");
@@ -1529,7 +1474,7 @@ swap(map<_Key, _Tp, _Compare, _Allocator>& __x,
template <class _Key, class _Tp, class _Compare = less<_Key>,
class _Allocator = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TYPE_VIS_ONLY multimap
+class _LIBCPP_TEMPLATE_VIS multimap
{
public:
// types:
@@ -1545,7 +1490,7 @@ public:
static_assert((is_same<typename allocator_type::value_type, value_type>::value),
"Allocator::value_type must be same type as value_type");
- class _LIBCPP_TYPE_VIS_ONLY value_compare
+ class _LIBCPP_TEMPLATE_VIS value_compare
: public binary_function<value_type, value_type, bool>
{
friend class multimap;
@@ -1621,7 +1566,7 @@ public:
#if _LIBCPP_STD_VER > 11
template <class _InputIterator>
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY
multimap(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
: multimap(__f, __l, key_compare(), __a) {}
#endif
@@ -1688,7 +1633,7 @@ public:
}
#if _LIBCPP_STD_VER > 11
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY
multimap(initializer_list<value_type> __il, const allocator_type& __a)
: multimap(__il, key_compare(), __a) {}
#endif
diff --git a/include/memory b/include/memory
index b4c2b35c0b73..a38d95b9446e 100644
--- a/include/memory
+++ b/include/memory
@@ -681,7 +681,7 @@ _ValueType __libcpp_acquire_load(_ValueType const* __value) {
template <class _Tp> class allocator;
template <>
-class _LIBCPP_TYPE_VIS_ONLY allocator<void>
+class _LIBCPP_TEMPLATE_VIS allocator<void>
{
public:
typedef void* pointer;
@@ -692,7 +692,7 @@ public:
};
template <>
-class _LIBCPP_TYPE_VIS_ONLY allocator<const void>
+class _LIBCPP_TEMPLATE_VIS allocator<const void>
{
public:
typedef const void* pointer;
@@ -927,7 +927,7 @@ struct __pointer_traits_rebind<_Sp<_Tp, _A0, _A1, _A2>, _Up, false>
#endif // _LIBCPP_HAS_NO_VARIADICS
template <class _Ptr>
-struct _LIBCPP_TYPE_VIS_ONLY pointer_traits
+struct _LIBCPP_TEMPLATE_VIS pointer_traits
{
typedef _Ptr pointer;
typedef typename __pointer_traits_element_type<pointer>::type element_type;
@@ -950,7 +950,7 @@ public:
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY pointer_traits<_Tp*>
+struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*>
{
typedef _Tp* pointer;
typedef _Tp element_type;
@@ -1489,7 +1489,7 @@ struct __alloc_traits_difference_type<_Alloc, _Ptr, true>
};
template <class _Alloc>
-struct _LIBCPP_TYPE_VIS_ONLY allocator_traits
+struct _LIBCPP_TEMPLATE_VIS allocator_traits
{
typedef _Alloc allocator_type;
typedef typename allocator_type::value_type value_type;
@@ -1742,7 +1742,7 @@ struct __rebind_alloc_helper
// allocator
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY allocator
+class _LIBCPP_TEMPLATE_VIS allocator
{
public:
typedef size_t size_type;
@@ -1840,7 +1840,7 @@ public:
};
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY allocator<const _Tp>
+class _LIBCPP_TEMPLATE_VIS allocator<const _Tp>
{
public:
typedef size_t size_type;
@@ -1944,7 +1944,7 @@ inline _LIBCPP_INLINE_VISIBILITY
bool operator!=(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return false;}
template <class _OutputIterator, class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY raw_storage_iterator
+class _LIBCPP_TEMPLATE_VIS raw_storage_iterator
: public iterator<output_iterator_tag,
_Tp, // purposefully not C++03
ptrdiff_t, // purposefully not C++03
@@ -2004,7 +2004,7 @@ struct auto_ptr_ref
};
template<class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY auto_ptr
+class _LIBCPP_TEMPLATE_VIS auto_ptr
{
private:
_Tp* __ptr_;
@@ -2048,7 +2048,7 @@ public:
};
template <>
-class _LIBCPP_TYPE_VIS_ONLY auto_ptr<void>
+class _LIBCPP_TEMPLATE_VIS auto_ptr<void>
{
public:
typedef void element_type;
@@ -2381,7 +2381,7 @@ struct __same_or_less_cv_qualified<_Ptr1, _Ptr2, false>
// default_delete
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY default_delete
+struct _LIBCPP_TEMPLATE_VIS default_delete
{
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR default_delete() _NOEXCEPT = default;
@@ -2400,7 +2400,7 @@ struct _LIBCPP_TYPE_VIS_ONLY default_delete
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY default_delete<_Tp[]>
+struct _LIBCPP_TEMPLATE_VIS default_delete<_Tp[]>
{
public:
#ifndef _LIBCPP_CXX03_LANG
@@ -2423,7 +2423,7 @@ public:
};
template <class _Tp, class _Dp = default_delete<_Tp> >
-class _LIBCPP_TYPE_VIS_ONLY unique_ptr
+class _LIBCPP_TEMPLATE_VIS unique_ptr
{
public:
typedef _Tp element_type;
@@ -2609,7 +2609,7 @@ public:
};
template <class _Tp, class _Dp>
-class _LIBCPP_TYPE_VIS_ONLY unique_ptr<_Tp[], _Dp>
+class _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
{
public:
typedef _Tp element_type;
@@ -3357,7 +3357,7 @@ inline size_t __hash_combine(size_t __lhs, size_t __rhs) _NOEXCEPT {
}
template<class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY hash<_Tp*>
+struct _LIBCPP_TEMPLATE_VIS hash<_Tp*>
: public unary_function<_Tp*, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -3374,7 +3374,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<_Tp*>
};
template <class _Tp, class _Dp>
-struct _LIBCPP_TYPE_VIS_ONLY hash<unique_ptr<_Tp, _Dp> >
+struct _LIBCPP_TEMPLATE_VIS hash<unique_ptr<_Tp, _Dp> >
{
typedef unique_ptr<_Tp, _Dp> argument_type;
typedef size_t result_type;
@@ -3699,7 +3699,7 @@ void __throw_bad_weak_ptr()
#endif
}
-template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY weak_ptr;
+template<class _Tp> class _LIBCPP_TEMPLATE_VIS weak_ptr;
class _LIBCPP_TYPE_VIS __shared_count
{
@@ -3877,10 +3877,10 @@ __shared_ptr_emplace<_Tp, _Alloc>::__on_zero_shared_weak() _NOEXCEPT
__a.deallocate(_PTraits::pointer_to(*this), 1);
}
-template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY enable_shared_from_this;
+template<class _Tp> class _LIBCPP_TEMPLATE_VIS enable_shared_from_this;
template<class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY shared_ptr
+class _LIBCPP_TEMPLATE_VIS shared_ptr
{
public:
typedef _Tp element_type;
@@ -4156,8 +4156,8 @@ private:
_LIBCPP_INLINE_VISIBILITY
void __enable_weak_this(const volatile void*, const volatile void*) _NOEXCEPT {}
- template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY shared_ptr;
- template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY weak_ptr;
+ template <class _Up> friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
+ template <class _Up> friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
};
template<class _Tp>
@@ -5090,7 +5090,7 @@ get_deleter(const shared_ptr<_Tp>& __p) _NOEXCEPT
#endif // _LIBCPP_NO_RTTI
template<class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY weak_ptr
+class _LIBCPP_TEMPLATE_VIS weak_ptr
{
public:
typedef _Tp element_type;
@@ -5175,8 +5175,8 @@ public:
bool owner_before(const weak_ptr<_Up>& __r) const
{return __cntrl_ < __r.__cntrl_;}
- template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY weak_ptr;
- template <class _Up> friend class _LIBCPP_TYPE_VIS_ONLY shared_ptr;
+ template <class _Up> friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
+ template <class _Up> friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
};
template<class _Tp>
@@ -5376,7 +5376,7 @@ template <class _Tp> struct owner_less;
#endif
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY owner_less<shared_ptr<_Tp> >
+struct _LIBCPP_TEMPLATE_VIS owner_less<shared_ptr<_Tp> >
: binary_function<shared_ptr<_Tp>, shared_ptr<_Tp>, bool>
{
typedef bool result_type;
@@ -5392,7 +5392,7 @@ struct _LIBCPP_TYPE_VIS_ONLY owner_less<shared_ptr<_Tp> >
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY owner_less<weak_ptr<_Tp> >
+struct _LIBCPP_TEMPLATE_VIS owner_less<weak_ptr<_Tp> >
: binary_function<weak_ptr<_Tp>, weak_ptr<_Tp>, bool>
{
typedef bool result_type;
@@ -5409,7 +5409,7 @@ struct _LIBCPP_TYPE_VIS_ONLY owner_less<weak_ptr<_Tp> >
#if _LIBCPP_STD_VER > 14
template <>
-struct _LIBCPP_TYPE_VIS_ONLY owner_less<void>
+struct _LIBCPP_TEMPLATE_VIS owner_less<void>
{
template <class _Tp, class _Up>
_LIBCPP_INLINE_VISIBILITY
@@ -5432,7 +5432,7 @@ struct _LIBCPP_TYPE_VIS_ONLY owner_less<void>
#endif
template<class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY enable_shared_from_this
+class _LIBCPP_TEMPLATE_VIS enable_shared_from_this
{
mutable weak_ptr<_Tp> __weak_this_;
protected:
@@ -5467,7 +5467,7 @@ public:
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY hash<shared_ptr<_Tp> >
+struct _LIBCPP_TEMPLATE_VIS hash<shared_ptr<_Tp> >
{
typedef shared_ptr<_Tp> argument_type;
typedef size_t result_type;
@@ -5616,6 +5616,15 @@ atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v
#endif // !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
//enum class
+#if defined(_LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE)
+# ifndef _LIBCPP_CXX03_LANG
+enum class pointer_safety : unsigned char {
+ relaxed,
+ preferred,
+ strict
+};
+# endif
+#else
struct _LIBCPP_TYPE_VIS pointer_safety
{
enum __lx
@@ -5628,15 +5637,32 @@ struct _LIBCPP_TYPE_VIS pointer_safety
__lx __v_;
_LIBCPP_INLINE_VISIBILITY
+ pointer_safety() : __v_() {}
+
+ _LIBCPP_INLINE_VISIBILITY
pointer_safety(__lx __v) : __v_(__v) {}
_LIBCPP_INLINE_VISIBILITY
operator int() const {return __v_;}
};
+#endif
+
+#if !defined(_LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE) && \
+ defined(_LIBCPP_BUILDING_MEMORY)
+_LIBCPP_FUNC_VIS pointer_safety get_pointer_safety() _NOEXCEPT;
+#else
+// This function is only offered in C++03 under ABI v1.
+# if !defined(_LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE) || !defined(_LIBCPP_CXX03_LANG)
+inline _LIBCPP_INLINE_VISIBILITY
+pointer_safety get_pointer_safety() _NOEXCEPT {
+ return pointer_safety::relaxed;
+}
+# endif
+#endif
+
_LIBCPP_FUNC_VIS void declare_reachable(void* __p);
_LIBCPP_FUNC_VIS void declare_no_pointers(char* __p, size_t __n);
_LIBCPP_FUNC_VIS void undeclare_no_pointers(char* __p, size_t __n);
-_LIBCPP_FUNC_VIS pointer_safety get_pointer_safety() _NOEXCEPT;
_LIBCPP_FUNC_VIS void* __undeclare_reachable(void* __p);
template <class _Tp>
diff --git a/include/mutex b/include/mutex
index 79befbeb56fe..8526533f1402 100644
--- a/include/mutex
+++ b/include/mutex
@@ -206,7 +206,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
class _LIBCPP_TYPE_VIS recursive_mutex
{
- __libcpp_mutex_t __m_;
+ __libcpp_recursive_mutex_t __m_;
public:
recursive_mutex();
@@ -221,7 +221,8 @@ public:
bool try_lock() _NOEXCEPT;
void unlock() _NOEXCEPT;
- typedef __libcpp_mutex_t* native_handle_type;
+ typedef __libcpp_recursive_mutex_t* native_handle_type;
+
_LIBCPP_INLINE_VISIBILITY
native_handle_type native_handle() {return &__m_;}
};
@@ -465,7 +466,7 @@ void __unlock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) {
#endif // !_LIBCPP_HAS_NO_THREADS
-struct _LIBCPP_TYPE_VIS_ONLY once_flag;
+struct _LIBCPP_TEMPLATE_VIS once_flag;
#ifndef _LIBCPP_HAS_NO_VARIADICS
@@ -485,7 +486,7 @@ void call_once(once_flag&, const _Callable&);
#endif // _LIBCPP_HAS_NO_VARIADICS
-struct _LIBCPP_TYPE_VIS_ONLY once_flag
+struct _LIBCPP_TEMPLATE_VIS once_flag
{
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
@@ -615,7 +616,7 @@ call_once(once_flag& __flag, const _Callable& __func)
#if defined(_LIBCPP_ABI_VARIADIC_LOCK_GUARD) \
&& !defined(_LIBCPP_CXX03_LANG)
template <>
-class _LIBCPP_TYPE_VIS_ONLY lock_guard<> {
+class _LIBCPP_TEMPLATE_VIS lock_guard<> {
public:
explicit lock_guard() {}
~lock_guard() = default;
@@ -628,7 +629,7 @@ public:
};
template <class ..._MArgs>
-class _LIBCPP_TYPE_VIS_ONLY lock_guard
+class _LIBCPP_TEMPLATE_VIS lock_guard
{
static_assert(sizeof...(_MArgs) >= 2, "At least 2 lock types required");
typedef tuple<_MArgs&...> _MutexTuple;
diff --git a/include/optional b/include/optional
index b950efd0bda7..c002cc729059 100644
--- a/include/optional
+++ b/include/optional
@@ -1295,7 +1295,7 @@ optional<_Tp> make_optional(initializer_list<_Up> __il, _Args&&... __args)
}
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY hash<optional<_Tp> >
+struct _LIBCPP_TEMPLATE_VIS hash<optional<_Tp> >
{
typedef optional<_Tp> argument_type;
typedef size_t result_type;
diff --git a/include/ostream b/include/ostream
index cf2051433a61..be35f2e16e70 100644
--- a/include/ostream
+++ b/include/ostream
@@ -148,7 +148,7 @@ template <class charT, class traits, class T>
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_ostream
+class _LIBCPP_TEMPLATE_VIS basic_ostream
: virtual public basic_ios<_CharT, _Traits>
{
public:
@@ -189,7 +189,7 @@ protected:
public:
// 27.7.2.4 Prefix/suffix:
- class _LIBCPP_TYPE_VIS_ONLY sentry;
+ class _LIBCPP_TEMPLATE_VIS sentry;
// 27.7.2.6 Formatted output:
inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
@@ -239,7 +239,7 @@ protected:
};
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_ostream<_CharT, _Traits>::sentry
+class _LIBCPP_TEMPLATE_VIS basic_ostream<_CharT, _Traits>::sentry
{
bool __ok_;
basic_ostream<_CharT, _Traits>& __os_;
diff --git a/include/queue b/include/queue
index 01247a29da2b..271c203e1d24 100644
--- a/include/queue
+++ b/include/queue
@@ -178,7 +178,7 @@ template <class T, class Container, class Compare>
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp, class _Container = deque<_Tp> > class _LIBCPP_TYPE_VIS_ONLY queue;
+template <class _Tp, class _Container = deque<_Tp> > class _LIBCPP_TEMPLATE_VIS queue;
template <class _Tp, class _Container>
_LIBCPP_INLINE_VISIBILITY
@@ -191,7 +191,7 @@ bool
operator< (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y);
template <class _Tp, class _Container /*= deque<_Tp>*/>
-class _LIBCPP_TYPE_VIS_ONLY queue
+class _LIBCPP_TEMPLATE_VIS queue
{
public:
typedef _Container container_type;
@@ -381,14 +381,14 @@ swap(queue<_Tp, _Container>& __x, queue<_Tp, _Container>& __y)
}
template <class _Tp, class _Container, class _Alloc>
-struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<queue<_Tp, _Container>, _Alloc>
+struct _LIBCPP_TEMPLATE_VIS uses_allocator<queue<_Tp, _Container>, _Alloc>
: public uses_allocator<_Container, _Alloc>
{
};
template <class _Tp, class _Container = vector<_Tp>,
class _Compare = less<typename _Container::value_type> >
-class _LIBCPP_TYPE_VIS_ONLY priority_queue
+class _LIBCPP_TEMPLATE_VIS priority_queue
{
public:
typedef _Container container_type;
@@ -732,7 +732,7 @@ swap(priority_queue<_Tp, _Container, _Compare>& __x,
}
template <class _Tp, class _Container, class _Compare, class _Alloc>
-struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc>
+struct _LIBCPP_TEMPLATE_VIS uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc>
: public uses_allocator<_Container, _Alloc>
{
};
diff --git a/include/random b/include/random
index 4e11f9e70771..835ebdb6c136 100644
--- a/include/random
+++ b/include/random
@@ -1813,7 +1813,7 @@ struct __lce_ta<__a, __c, __m, (unsigned short)(~0), __b>
};
template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-class _LIBCPP_TYPE_VIS_ONLY linear_congruential_engine;
+class _LIBCPP_TEMPLATE_VIS linear_congruential_engine;
template <class _CharT, class _Traits,
class _Up, _Up _Ap, _Up _Cp, _Up _Np>
@@ -1829,7 +1829,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
linear_congruential_engine<_Up, _Ap, _Cp, _Np>& __x);
template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-class _LIBCPP_TYPE_VIS_ONLY linear_congruential_engine
+class _LIBCPP_TEMPLATE_VIS linear_congruential_engine
{
public:
// types
@@ -2011,7 +2011,7 @@ typedef minstd_rand default_random_engine;
template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
_UIntType __a, size_t __u, _UIntType __d, size_t __s,
_UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-class _LIBCPP_TYPE_VIS_ONLY mersenne_twister_engine;
+class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine;
template <class _UI, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UI _Ap, size_t _Up, _UI _Dp, size_t _Sp,
@@ -2053,7 +2053,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
_UIntType __a, size_t __u, _UIntType __d, size_t __s,
_UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-class _LIBCPP_TYPE_VIS_ONLY mersenne_twister_engine
+class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
{
public:
// types
@@ -2499,7 +2499,7 @@ typedef mersenne_twister_engine<uint_fast64_t, 64, 312, 156, 31,
// subtract_with_carry_engine
template<class _UIntType, size_t __w, size_t __s, size_t __r>
-class _LIBCPP_TYPE_VIS_ONLY subtract_with_carry_engine;
+class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine;
template<class _UI, size_t _Wp, size_t _Sp, size_t _Rp>
bool
@@ -2527,7 +2527,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
subtract_with_carry_engine<_UI, _Wp, _Sp, _Rp>& __x);
template<class _UIntType, size_t __w, size_t __s, size_t __r>
-class _LIBCPP_TYPE_VIS_ONLY subtract_with_carry_engine
+class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine
{
public:
// types
@@ -2810,7 +2810,7 @@ typedef subtract_with_carry_engine<uint_fast64_t, 48, 5, 12> ranlux48_base;
// discard_block_engine
template<class _Engine, size_t __p, size_t __r>
-class _LIBCPP_TYPE_VIS_ONLY discard_block_engine
+class _LIBCPP_TEMPLATE_VIS discard_block_engine
{
_Engine __e_;
int __n_;
@@ -2984,7 +2984,7 @@ typedef discard_block_engine<ranlux48_base, 389, 11> ranlux48;
// independent_bits_engine
template<class _Engine, size_t __w, class _UIntType>
-class _LIBCPP_TYPE_VIS_ONLY independent_bits_engine
+class _LIBCPP_TEMPLATE_VIS independent_bits_engine
{
template <class _UI, _UI _R0, size_t _Wp, size_t _Mp>
class __get_n
@@ -3248,7 +3248,7 @@ public:
};
template<class _Engine, size_t __k>
-class _LIBCPP_TYPE_VIS_ONLY shuffle_order_engine
+class _LIBCPP_TEMPLATE_VIS shuffle_order_engine
{
static_assert(0 < __k, "shuffle_order_engine invalid parameters");
public:
@@ -3511,7 +3511,7 @@ private:
// seed_seq
-class _LIBCPP_TYPE_VIS_ONLY seed_seq
+class _LIBCPP_TEMPLATE_VIS seed_seq
{
public:
// types
@@ -3688,13 +3688,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// uniform_real_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY uniform_real_distribution
+class _LIBCPP_TEMPLATE_VIS uniform_real_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __a_;
result_type __b_;
@@ -3809,13 +3809,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// bernoulli_distribution
-class _LIBCPP_TYPE_VIS_ONLY bernoulli_distribution
+class _LIBCPP_TEMPLATE_VIS bernoulli_distribution
{
public:
// types
typedef bool result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
double __p_;
public:
@@ -3918,13 +3918,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bernoulli_distribution& __x)
// binomial_distribution
template<class _IntType = int>
-class _LIBCPP_TYPE_VIS_ONLY binomial_distribution
+class _LIBCPP_TEMPLATE_VIS binomial_distribution
{
public:
// types
typedef _IntType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __t_;
double __p_;
@@ -4086,13 +4086,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// exponential_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY exponential_distribution
+class _LIBCPP_TEMPLATE_VIS exponential_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __lambda_;
public:
@@ -4201,13 +4201,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// normal_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY normal_distribution
+class _LIBCPP_TEMPLATE_VIS normal_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __mean_;
result_type __stddev_;
@@ -4369,13 +4369,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// lognormal_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY lognormal_distribution
+class _LIBCPP_TEMPLATE_VIS lognormal_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
normal_distribution<result_type> __nd_;
public:
@@ -4494,13 +4494,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// poisson_distribution
template<class _IntType = int>
-class _LIBCPP_TYPE_VIS_ONLY poisson_distribution
+class _LIBCPP_TEMPLATE_VIS poisson_distribution
{
public:
// types
typedef _IntType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
double __mean_;
double __s_;
@@ -4725,13 +4725,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// weibull_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY weibull_distribution
+class _LIBCPP_TEMPLATE_VIS weibull_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __a_;
result_type __b_;
@@ -4839,13 +4839,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
}
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY extreme_value_distribution
+class _LIBCPP_TEMPLATE_VIS extreme_value_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __a_;
result_type __b_;
@@ -4960,13 +4960,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// gamma_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY gamma_distribution
+class _LIBCPP_TEMPLATE_VIS gamma_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __alpha_;
result_type __beta_;
@@ -5132,13 +5132,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// negative_binomial_distribution
template<class _IntType = int>
-class _LIBCPP_TYPE_VIS_ONLY negative_binomial_distribution
+class _LIBCPP_TEMPLATE_VIS negative_binomial_distribution
{
public:
// types
typedef _IntType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __k_;
double __p_;
@@ -5267,13 +5267,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// geometric_distribution
template<class _IntType = int>
-class _LIBCPP_TYPE_VIS_ONLY geometric_distribution
+class _LIBCPP_TEMPLATE_VIS geometric_distribution
{
public:
// types
typedef _IntType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
double __p_;
public:
@@ -5369,13 +5369,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// chi_squared_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY chi_squared_distribution
+class _LIBCPP_TEMPLATE_VIS chi_squared_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __n_;
public:
@@ -5475,13 +5475,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// cauchy_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY cauchy_distribution
+class _LIBCPP_TEMPLATE_VIS cauchy_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __a_;
result_type __b_;
@@ -5598,13 +5598,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// fisher_f_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY fisher_f_distribution
+class _LIBCPP_TEMPLATE_VIS fisher_f_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __m_;
result_type __n_;
@@ -5720,13 +5720,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// student_t_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY student_t_distribution
+class _LIBCPP_TEMPLATE_VIS student_t_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
result_type __n_;
public:
@@ -5833,13 +5833,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// discrete_distribution
template<class _IntType = int>
-class _LIBCPP_TYPE_VIS_ONLY discrete_distribution
+class _LIBCPP_TEMPLATE_VIS discrete_distribution
{
public:
// types
typedef _IntType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
vector<double> __p_;
public:
@@ -6061,13 +6061,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// piecewise_constant_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY piecewise_constant_distribution
+class _LIBCPP_TEMPLATE_VIS piecewise_constant_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
vector<result_type> __b_;
vector<result_type> __densities_;
@@ -6384,13 +6384,13 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
// piecewise_linear_distribution
template<class _RealType = double>
-class _LIBCPP_TYPE_VIS_ONLY piecewise_linear_distribution
+class _LIBCPP_TEMPLATE_VIS piecewise_linear_distribution
{
public:
// types
typedef _RealType result_type;
- class _LIBCPP_TYPE_VIS_ONLY param_type
+ class _LIBCPP_TEMPLATE_VIS param_type
{
vector<result_type> __b_;
vector<result_type> __densities_;
diff --git a/include/ratio b/include/ratio
index 08eb774df665..fa893637d51d 100644
--- a/include/ratio
+++ b/include/ratio
@@ -244,7 +244,7 @@ public:
};
template <intmax_t _Num, intmax_t _Den = 1>
-class _LIBCPP_TYPE_VIS_ONLY ratio
+class _LIBCPP_TEMPLATE_VIS ratio
{
static_assert(__static_abs<_Num>::value >= 0, "ratio numerator is out of range");
static_assert(_Den != 0, "ratio divide by 0");
@@ -308,7 +308,7 @@ template <class _R1, class _R2> using ratio_multiply
#else // _LIBCPP_CXX03_LANG
template <class _R1, class _R2>
-struct _LIBCPP_TYPE_VIS_ONLY ratio_multiply
+struct _LIBCPP_TEMPLATE_VIS ratio_multiply
: public __ratio_multiply<_R1, _R2>::type {};
#endif // _LIBCPP_CXX03_LANG
@@ -335,7 +335,7 @@ template <class _R1, class _R2> using ratio_divide
#else // _LIBCPP_CXX03_LANG
template <class _R1, class _R2>
-struct _LIBCPP_TYPE_VIS_ONLY ratio_divide
+struct _LIBCPP_TEMPLATE_VIS ratio_divide
: public __ratio_divide<_R1, _R2>::type {};
#endif // _LIBCPP_CXX03_LANG
@@ -370,7 +370,7 @@ template <class _R1, class _R2> using ratio_add
#else // _LIBCPP_CXX03_LANG
template <class _R1, class _R2>
-struct _LIBCPP_TYPE_VIS_ONLY ratio_add
+struct _LIBCPP_TEMPLATE_VIS ratio_add
: public __ratio_add<_R1, _R2>::type {};
#endif // _LIBCPP_CXX03_LANG
@@ -405,7 +405,7 @@ template <class _R1, class _R2> using ratio_subtract
#else // _LIBCPP_CXX03_LANG
template <class _R1, class _R2>
-struct _LIBCPP_TYPE_VIS_ONLY ratio_subtract
+struct _LIBCPP_TEMPLATE_VIS ratio_subtract
: public __ratio_subtract<_R1, _R2>::type {};
#endif // _LIBCPP_CXX03_LANG
@@ -413,11 +413,11 @@ struct _LIBCPP_TYPE_VIS_ONLY ratio_subtract
// ratio_equal
template <class _R1, class _R2>
-struct _LIBCPP_TYPE_VIS_ONLY ratio_equal
+struct _LIBCPP_TEMPLATE_VIS ratio_equal
: public _LIBCPP_BOOL_CONSTANT((_R1::num == _R2::num && _R1::den == _R2::den)) {};
template <class _R1, class _R2>
-struct _LIBCPP_TYPE_VIS_ONLY ratio_not_equal
+struct _LIBCPP_TEMPLATE_VIS ratio_not_equal
: public _LIBCPP_BOOL_CONSTANT((!ratio_equal<_R1, _R2>::value)) {};
// ratio_less
@@ -476,19 +476,19 @@ struct __ratio_less<_R1, _R2, -1LL, -1LL>
};
template <class _R1, class _R2>
-struct _LIBCPP_TYPE_VIS_ONLY ratio_less
+struct _LIBCPP_TEMPLATE_VIS ratio_less
: public _LIBCPP_BOOL_CONSTANT((__ratio_less<_R1, _R2>::value)) {};
template <class _R1, class _R2>
-struct _LIBCPP_TYPE_VIS_ONLY ratio_less_equal
+struct _LIBCPP_TEMPLATE_VIS ratio_less_equal
: public _LIBCPP_BOOL_CONSTANT((!ratio_less<_R2, _R1>::value)) {};
template <class _R1, class _R2>
-struct _LIBCPP_TYPE_VIS_ONLY ratio_greater
+struct _LIBCPP_TEMPLATE_VIS ratio_greater
: public _LIBCPP_BOOL_CONSTANT((ratio_less<_R2, _R1>::value)) {};
template <class _R1, class _R2>
-struct _LIBCPP_TYPE_VIS_ONLY ratio_greater_equal
+struct _LIBCPP_TEMPLATE_VIS ratio_greater_equal
: public _LIBCPP_BOOL_CONSTANT((!ratio_less<_R1, _R2>::value)) {};
template <class _R1, class _R2>
diff --git a/include/regex b/include/regex
index 5a6c7fbb8e0a..d8f1fae97230 100644
--- a/include/regex
+++ b/include/regex
@@ -970,7 +970,7 @@ void __throw_regex_error()
}
template <class _CharT>
-struct _LIBCPP_TYPE_VIS_ONLY regex_traits
+struct _LIBCPP_TEMPLATE_VIS regex_traits
{
public:
typedef _CharT char_type;
@@ -1287,11 +1287,11 @@ regex_traits<_CharT>::__regex_traits_value(wchar_t __ch, int __radix) const
template <class _CharT> class __node;
-template <class _BidirectionalIterator> class _LIBCPP_TYPE_VIS_ONLY sub_match;
+template <class _BidirectionalIterator> class _LIBCPP_TEMPLATE_VIS sub_match;
template <class _BidirectionalIterator,
class _Allocator = allocator<sub_match<_BidirectionalIterator> > >
-class _LIBCPP_TYPE_VIS_ONLY match_results;
+class _LIBCPP_TEMPLATE_VIS match_results;
template <class _CharT>
struct __state
@@ -2472,7 +2472,7 @@ __exit:
template <class _CharT, class _Traits> class __lookahead;
template <class _CharT, class _Traits = regex_traits<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY basic_regex
+class _LIBCPP_TEMPLATE_VIS basic_regex
{
public:
// types:
@@ -4765,7 +4765,7 @@ typedef basic_regex<wchar_t> wregex;
// sub_match
template <class _BidirectionalIterator>
-class _LIBCPP_TYPE_VIS_ONLY sub_match
+class _LIBCPP_TEMPLATE_VIS sub_match
: public pair<_BidirectionalIterator, _BidirectionalIterator>
{
public:
@@ -5188,7 +5188,7 @@ operator<<(basic_ostream<_CharT, _ST>& __os, const sub_match<_BiIter>& __m)
}
template <class _BidirectionalIterator, class _Allocator>
-class _LIBCPP_TYPE_VIS_ONLY match_results
+class _LIBCPP_TEMPLATE_VIS match_results
{
public:
typedef _Allocator allocator_type;
@@ -6052,7 +6052,7 @@ regex_match(const basic_string<_CharT, _ST, _SA>& __s,
template <class _BidirectionalIterator,
class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type,
class _Traits = regex_traits<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY regex_iterator
+class _LIBCPP_TEMPLATE_VIS regex_iterator
{
public:
typedef basic_regex<_CharT, _Traits> regex_type;
@@ -6171,7 +6171,7 @@ typedef regex_iterator<wstring::const_iterator> wsregex_iterator;
template <class _BidirectionalIterator,
class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type,
class _Traits = regex_traits<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY regex_token_iterator
+class _LIBCPP_TEMPLATE_VIS regex_token_iterator
{
public:
typedef basic_regex<_CharT, _Traits> regex_type;
diff --git a/include/scoped_allocator b/include/scoped_allocator
index 605f70b472f1..d60ae94f14e1 100644
--- a/include/scoped_allocator
+++ b/include/scoped_allocator
@@ -384,7 +384,7 @@ struct __outermost<_Alloc, true>
};
template <class _OuterAlloc, class... _InnerAllocs>
-class _LIBCPP_TYPE_VIS_ONLY scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...>
+class _LIBCPP_TEMPLATE_VIS scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...>
: public __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...>
{
typedef __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...> base;
diff --git a/include/set b/include/set
index 8e4c2ae6a604..be5c9528caf8 100644
--- a/include/set
+++ b/include/set
@@ -397,7 +397,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Key, class _Compare = less<_Key>,
class _Allocator = allocator<_Key> >
-class _LIBCPP_TYPE_VIS_ONLY set
+class _LIBCPP_TEMPLATE_VIS set
{
public:
// types:
@@ -810,7 +810,7 @@ swap(set<_Key, _Compare, _Allocator>& __x,
template <class _Key, class _Compare = less<_Key>,
class _Allocator = allocator<_Key> >
-class _LIBCPP_TYPE_VIS_ONLY multiset
+class _LIBCPP_TEMPLATE_VIS multiset
{
public:
// types:
diff --git a/include/sstream b/include/sstream
index 18bccf6ac6c7..40b97854f7f0 100644
--- a/include/sstream
+++ b/include/sstream
@@ -186,7 +186,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// basic_stringbuf
template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TYPE_VIS_ONLY basic_stringbuf
+class _LIBCPP_TEMPLATE_VIS basic_stringbuf
: public basic_streambuf<_CharT, _Traits>
{
public:
@@ -618,7 +618,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::seekpos(pos_type __sp,
// basic_istringstream
template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TYPE_VIS_ONLY basic_istringstream
+class _LIBCPP_TEMPLATE_VIS basic_istringstream
: public basic_istream<_CharT, _Traits>
{
public:
@@ -735,7 +735,7 @@ void basic_istringstream<_CharT, _Traits, _Allocator>::str(const string_type& __
// basic_ostringstream
template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TYPE_VIS_ONLY basic_ostringstream
+class _LIBCPP_TEMPLATE_VIS basic_ostringstream
: public basic_ostream<_CharT, _Traits>
{
public:
@@ -854,7 +854,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::str(const string_type& __s)
// basic_stringstream
template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TYPE_VIS_ONLY basic_stringstream
+class _LIBCPP_TEMPLATE_VIS basic_stringstream
: public basic_iostream<_CharT, _Traits>
{
public:
diff --git a/include/stack b/include/stack
index ee3fac8c4548..228864e4709b 100644
--- a/include/stack
+++ b/include/stack
@@ -91,7 +91,7 @@ template <class T, class Container>
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _Tp, class _Container = deque<_Tp> > class _LIBCPP_TYPE_VIS_ONLY stack;
+template <class _Tp, class _Container = deque<_Tp> > class _LIBCPP_TEMPLATE_VIS stack;
template <class _Tp, class _Container>
_LIBCPP_INLINE_VISIBILITY
@@ -104,7 +104,7 @@ bool
operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
template <class _Tp, class _Container /*= deque<_Tp>*/>
-class _LIBCPP_TYPE_VIS_ONLY stack
+class _LIBCPP_TEMPLATE_VIS stack
{
public:
typedef _Container container_type;
@@ -286,7 +286,7 @@ swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y)
}
template <class _Tp, class _Container, class _Alloc>
-struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<stack<_Tp, _Container>, _Alloc>
+struct _LIBCPP_TEMPLATE_VIS uses_allocator<stack<_Tp, _Container>, _Alloc>
: public uses_allocator<_Container, _Alloc>
{
};
diff --git a/include/streambuf b/include/streambuf
index 6c478384d769..86070659a4b4 100644
--- a/include/streambuf
+++ b/include/streambuf
@@ -119,7 +119,7 @@ protected:
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY basic_streambuf
+class _LIBCPP_TEMPLATE_VIS basic_streambuf
{
public:
// types:
diff --git a/include/string b/include/string
index 98f538c38a0e..136a5fb8949d 100644
--- a/include/string
+++ b/include/string
@@ -497,7 +497,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// fpos
template <class _StateT>
-class _LIBCPP_TYPE_VIS_ONLY fpos
+class _LIBCPP_TEMPLATE_VIS fpos
{
private:
_StateT __st_;
@@ -555,7 +555,7 @@ basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, _CharT __y);
template <bool>
-class _LIBCPP_TYPE_VIS_ONLY __basic_string_common
+class _LIBCPP_TEMPLATE_VIS __basic_string_common
{
protected:
_LIBCPP_NORETURN void __throw_length_error() const;
@@ -630,7 +630,7 @@ struct __padding<_CharT, 1>
#endif // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
template<class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TYPE_VIS_ONLY basic_string
+class _LIBCPP_TEMPLATE_VIS basic_string
: private __basic_string_common<true>
{
public:
@@ -3870,7 +3870,7 @@ template<class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>::npos;
template<class _CharT, class _Traits, class _Allocator>
-struct _LIBCPP_TYPE_VIS_ONLY hash<basic_string<_CharT, _Traits, _Allocator> >
+struct _LIBCPP_TEMPLATE_VIS hash<basic_string<_CharT, _Traits, _Allocator> >
: public unary_function<basic_string<_CharT, _Traits, _Allocator>, size_t>
{
size_t
diff --git a/include/string_view b/include/string_view
index e66ac40d3e2f..f98bbb5345dc 100644
--- a/include/string_view
+++ b/include/string_view
@@ -177,7 +177,7 @@ namespace std {
_LIBCPP_BEGIN_NAMESPACE_STD
template<class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TYPE_VIS_ONLY basic_string_view {
+class _LIBCPP_TEMPLATE_VIS basic_string_view {
public:
// types
typedef _Traits traits_type;
@@ -735,7 +735,7 @@ typedef basic_string_view<wchar_t> wstring_view;
// [string.view.hash]
template<class _CharT, class _Traits>
-struct _LIBCPP_TYPE_VIS_ONLY hash<basic_string_view<_CharT, _Traits> >
+struct _LIBCPP_TEMPLATE_VIS hash<basic_string_view<_CharT, _Traits> >
: public unary_function<basic_string_view<_CharT, _Traits>, size_t>
{
size_t operator()(const basic_string_view<_CharT, _Traits> __val) const _NOEXCEPT;
diff --git a/include/system_error b/include/system_error
index 58040639d3ec..3257ef9569fb 100644
--- a/include/system_error
+++ b/include/system_error
@@ -240,7 +240,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// is_error_code_enum
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum
+struct _LIBCPP_TEMPLATE_VIS is_error_code_enum
: public false_type {};
#if _LIBCPP_STD_VER > 14
@@ -251,7 +251,7 @@ constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value;
// is_error_condition_enum
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_error_condition_enum
+struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum
: public false_type {};
#if _LIBCPP_STD_VER > 14
@@ -363,12 +363,12 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc)
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(errc)
template <>
-struct _LIBCPP_TYPE_VIS_ONLY is_error_condition_enum<errc>
+struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc>
: true_type { };
#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
template <>
-struct _LIBCPP_TYPE_VIS_ONLY is_error_condition_enum<errc::__lx>
+struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc::__lx>
: true_type { };
#endif
@@ -621,7 +621,7 @@ operator!=(const error_condition& __x, const error_condition& __y) _NOEXCEPT
{return !(__x == __y);}
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<error_code>
+struct _LIBCPP_TEMPLATE_VIS hash<error_code>
: public unary_function<error_code, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -632,7 +632,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<error_code>
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<error_condition>
+struct _LIBCPP_TEMPLATE_VIS hash<error_condition>
: public unary_function<error_condition, size_t>
{
_LIBCPP_INLINE_VISIBILITY
diff --git a/include/thread b/include/thread
index 7fe4c77e1b10..b5b96e8c71ed 100644
--- a/include/thread
+++ b/include/thread
@@ -211,7 +211,7 @@ _LIBCPP_INLINE_VISIBILITY __thread_id get_id() _NOEXCEPT;
template<> struct hash<__thread_id>;
-class _LIBCPP_TYPE_VIS_ONLY __thread_id
+class _LIBCPP_TEMPLATE_VIS __thread_id
{
// FIXME: pthread_t is a pointer on Darwin but a long on Linux.
// NULL is the no-thread value on Darwin. Someone needs to check
@@ -254,11 +254,11 @@ private:
friend __thread_id this_thread::get_id() _NOEXCEPT;
friend class _LIBCPP_TYPE_VIS thread;
- friend struct _LIBCPP_TYPE_VIS_ONLY hash<__thread_id>;
+ friend struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>;
};
template<>
-struct _LIBCPP_TYPE_VIS_ONLY hash<__thread_id>
+struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>
: public unary_function<__thread_id, size_t>
{
_LIBCPP_INLINE_VISIBILITY
diff --git a/include/tuple b/include/tuple
index 2f71cce74139..cddb70954ee0 100644
--- a/include/tuple
+++ b/include/tuple
@@ -471,7 +471,7 @@ struct __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
template <class ..._Tp>
-class _LIBCPP_TYPE_VIS_ONLY tuple
+class _LIBCPP_TEMPLATE_VIS tuple
{
typedef __tuple_impl<typename __make_tuple_indices<sizeof...(_Tp)>::type, _Tp...> base;
@@ -908,7 +908,7 @@ public:
};
template <>
-class _LIBCPP_TYPE_VIS_ONLY tuple<>
+class _LIBCPP_TEMPLATE_VIS tuple<>
{
public:
_LIBCPP_INLINE_VISIBILITY
@@ -1340,7 +1340,7 @@ tuple_cat(_Tuple0&& __t0, _Tuples&&... __tpls)
}
template <class ..._Tp, class _Alloc>
-struct _LIBCPP_TYPE_VIS_ONLY uses_allocator<tuple<_Tp...>, _Alloc>
+struct _LIBCPP_TEMPLATE_VIS uses_allocator<tuple<_Tp...>, _Alloc>
: true_type {};
#endif // _LIBCPP_HAS_NO_VARIADICS
diff --git a/include/type_traits b/include/type_traits
index db9c1d11c983..d7ba251549dc 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -392,9 +392,9 @@ namespace std
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS_ONLY pair;
-template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY reference_wrapper;
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY hash;
+template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS pair;
+template <class _Tp> class _LIBCPP_TEMPLATE_VIS reference_wrapper;
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
template <class>
struct __void_t { typedef void type; };
@@ -403,22 +403,22 @@ template <class _Tp>
struct __identity { typedef _Tp type; };
template <class _Tp, bool>
-struct _LIBCPP_TYPE_VIS_ONLY __dependent_type : public _Tp {};
+struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {};
template <bool _Bp, class _If, class _Then>
- struct _LIBCPP_TYPE_VIS_ONLY conditional {typedef _If type;};
+ struct _LIBCPP_TEMPLATE_VIS conditional {typedef _If type;};
template <class _If, class _Then>
- struct _LIBCPP_TYPE_VIS_ONLY conditional<false, _If, _Then> {typedef _Then type;};
+ struct _LIBCPP_TEMPLATE_VIS conditional<false, _If, _Then> {typedef _Then type;};
#if _LIBCPP_STD_VER > 11
template <bool _Bp, class _If, class _Then> using conditional_t = typename conditional<_Bp, _If, _Then>::type;
#endif
-template <bool, class _Tp> struct _LIBCPP_TYPE_VIS_ONLY __lazy_enable_if {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY __lazy_enable_if<true, _Tp> {typedef typename _Tp::type type;};
+template <bool, class _Tp> struct _LIBCPP_TEMPLATE_VIS __lazy_enable_if {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS __lazy_enable_if<true, _Tp> {typedef typename _Tp::type type;};
-template <bool, class _Tp = void> struct _LIBCPP_TYPE_VIS_ONLY enable_if {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY enable_if<true, _Tp> {typedef _Tp type;};
+template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS enable_if<true, _Tp> {typedef _Tp type;};
#if _LIBCPP_STD_VER > 11
template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp, _Tp>::type;
@@ -498,7 +498,7 @@ struct __two {char __lx[2];};
// helper class:
template <class _Tp, _Tp __v>
-struct _LIBCPP_TYPE_VIS_ONLY integral_constant
+struct _LIBCPP_TEMPLATE_VIS integral_constant
{
static _LIBCPP_CONSTEXPR const _Tp value = __v;
typedef _Tp value_type;
@@ -604,8 +604,8 @@ struct __not_ : conditional<_Tp::value, false_type, true_type>::type {};
// is_const
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_const : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_const<_Tp const> : public true_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_const : public false_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_const<_Tp const> : public true_type {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Tp> _LIBCPP_CONSTEXPR bool is_const_v
@@ -614,8 +614,8 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_const_v
// is_volatile
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_volatile : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_volatile<_Tp volatile> : public true_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_volatile : public false_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_volatile<_Tp volatile> : public true_type {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Tp> _LIBCPP_CONSTEXPR bool is_volatile_v
@@ -624,23 +624,23 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_volatile_v
// remove_const
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_const {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_const<const _Tp> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_const {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_const<const _Tp> {typedef _Tp type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using remove_const_t = typename remove_const<_Tp>::type;
#endif
// remove_volatile
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_volatile {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_volatile<volatile _Tp> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_volatile {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_volatile<volatile _Tp> {typedef _Tp type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using remove_volatile_t = typename remove_volatile<_Tp>::type;
#endif
// remove_cv
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_cv
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
{typedef typename remove_volatile<typename remove_const<_Tp>::type>::type type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using remove_cv_t = typename remove_cv<_Tp>::type;
@@ -651,7 +651,7 @@ template <class _Tp> using remove_cv_t = typename remove_cv<_Tp>::type;
template <class _Tp> struct __libcpp_is_void : public false_type {};
template <> struct __libcpp_is_void<void> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_void
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_void
: public __libcpp_is_void<typename remove_cv<_Tp>::type> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -664,11 +664,11 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_void_v
template <class _Tp> struct __is_nullptr_t_impl : public false_type {};
template <> struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY __is_nullptr_t
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t
: public __is_nullptr_t_impl<typename remove_cv<_Tp>::type> {};
#if _LIBCPP_STD_VER > 11
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_null_pointer
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_null_pointer
: public __is_nullptr_t_impl<typename remove_cv<_Tp>::type> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -702,7 +702,7 @@ template <> struct __libcpp_is_integral<__int128_t> : public tr
template <> struct __libcpp_is_integral<__uint128_t> : public true_type {};
#endif
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_integral
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_integral
: public __libcpp_is_integral<typename remove_cv<_Tp>::type> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -717,7 +717,7 @@ template <> struct __libcpp_is_floating_point<float> : public tru
template <> struct __libcpp_is_floating_point<double> : public true_type {};
template <> struct __libcpp_is_floating_point<long double> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_floating_point
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_floating_point
: public __libcpp_is_floating_point<typename remove_cv<_Tp>::type> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -727,11 +727,11 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_floating_point_v
// is_array
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_array
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_array
: public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_array<_Tp[]>
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[]>
: public true_type {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY is_array<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[_Np]>
: public true_type {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -744,7 +744,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_array_v
template <class _Tp> struct __libcpp_is_pointer : public false_type {};
template <class _Tp> struct __libcpp_is_pointer<_Tp*> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pointer
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pointer
: public __libcpp_is_pointer<typename remove_cv<_Tp>::type> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -754,18 +754,18 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_pointer_v
// is_reference
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_lvalue_reference : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_lvalue_reference<_Tp&> : public true_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference<_Tp&> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_rvalue_reference : public false_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : public false_type {};
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_rvalue_reference<_Tp&&> : public true_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {};
#endif
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_reference : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_reference<_Tp&> : public true_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference : public false_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&> : public true_type {};
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_reference<_Tp&&> : public true_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public true_type {};
#endif
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -782,13 +782,13 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_rvalue_reference_v
#if __has_feature(is_union) || (_GNUC_VER >= 403)
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_union
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_union
: public integral_constant<bool, __is_union(_Tp)> {};
#else
template <class _Tp> struct __libcpp_union : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_union
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_union
: public __libcpp_union<typename remove_cv<_Tp>::type> {};
#endif
@@ -802,7 +802,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_union_v
#if __has_feature(is_class) || (_GNUC_VER >= 403)
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_class
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_class
: public integral_constant<bool, __is_class(_Tp)> {};
#else
@@ -813,7 +813,7 @@ template <class _Tp> char __test(int _Tp::*);
template <class _Tp> __two __test(...);
}
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_class
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_class
: public integral_constant<bool, sizeof(__is_class_imp::__test<_Tp>(0)) == 1 && !is_union<_Tp>::value> {};
#endif
@@ -825,8 +825,8 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_class_v
// is_same
-template <class _Tp, class _Up> struct _LIBCPP_TYPE_VIS_ONLY is_same : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_same<_Tp, _Tp> : public true_type {};
+template <class _Tp, class _Up> struct _LIBCPP_TEMPLATE_VIS is_same : public false_type {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_same<_Tp, _Tp> : public true_type {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Tp, class _Up> _LIBCPP_CONSTEXPR bool is_same_v
@@ -855,7 +855,7 @@ struct __libcpp_is_function
{};
template <class _Tp> struct __libcpp_is_function<_Tp, true> : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_function
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_function
: public __libcpp_is_function<_Tp> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -882,7 +882,7 @@ template <class _Ret, class _Class>
struct __libcpp_is_member_function_pointer<_Ret _Class::*>
: public is_function<_Ret> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_function_pointer
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer
: public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type>::type {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -895,7 +895,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_member_function_pointer_v
template <class _Tp> struct __libcpp_is_member_pointer : public false_type {};
template <class _Tp, class _Up> struct __libcpp_is_member_pointer<_Tp _Up::*> : public true_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_pointer
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_pointer
: public __libcpp_is_member_pointer<typename remove_cv<_Tp>::type> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -905,7 +905,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_member_pointer_v
// is_member_object_pointer
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_member_object_pointer
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer
: public integral_constant<bool, is_member_pointer<_Tp>::value &&
!is_member_function_pointer<_Tp>::value> {};
@@ -918,12 +918,12 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_member_object_pointer_v
#if __has_feature(is_enum) || (_GNUC_VER >= 403)
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_enum
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_enum
: public integral_constant<bool, __is_enum(_Tp)> {};
#else
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_enum
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_enum
: public integral_constant<bool, !is_void<_Tp>::value &&
!is_integral<_Tp>::value &&
!is_floating_point<_Tp>::value &&
@@ -944,7 +944,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_enum_v
// is_arithmetic
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_arithmetic
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_arithmetic
: public integral_constant<bool, is_integral<_Tp>::value ||
is_floating_point<_Tp>::value> {};
@@ -955,7 +955,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_arithmetic_v
// is_fundamental
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_fundamental
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_fundamental
: public integral_constant<bool, is_void<_Tp>::value ||
__is_nullptr_t<_Tp>::value ||
is_arithmetic<_Tp>::value> {};
@@ -967,14 +967,14 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_fundamental_v
// is_scalar
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_scalar
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_scalar
: public integral_constant<bool, is_arithmetic<_Tp>::value ||
is_member_pointer<_Tp>::value ||
is_pointer<_Tp>::value ||
__is_nullptr_t<_Tp>::value ||
is_enum<_Tp>::value > {};
-template <> struct _LIBCPP_TYPE_VIS_ONLY is_scalar<nullptr_t> : public true_type {};
+template <> struct _LIBCPP_TEMPLATE_VIS is_scalar<nullptr_t> : public true_type {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Tp> _LIBCPP_CONSTEXPR bool is_scalar_v
@@ -983,7 +983,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_scalar_v
// is_object
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_object
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_object
: public integral_constant<bool, is_scalar<_Tp>::value ||
is_array<_Tp>::value ||
is_union<_Tp>::value ||
@@ -996,7 +996,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_object_v
// is_compound
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_compound
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_compound
: public integral_constant<bool, !is_fundamental<_Tp>::value> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -1027,7 +1027,7 @@ struct __add_const {typedef _Tp type;};
template <class _Tp>
struct __add_const<_Tp, false> {typedef const _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_const
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_const
{typedef typename __add_const<_Tp>::type type;};
#if _LIBCPP_STD_VER > 11
@@ -1044,7 +1044,7 @@ struct __add_volatile {typedef _Tp type;};
template <class _Tp>
struct __add_volatile<_Tp, false> {typedef volatile _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_volatile
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_volatile
{typedef typename __add_volatile<_Tp>::type type;};
#if _LIBCPP_STD_VER > 11
@@ -1053,7 +1053,7 @@ template <class _Tp> using add_volatile_t = typename add_volatile<_Tp>::type;
// add_cv
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_cv
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_cv
{typedef typename add_const<typename add_volatile<_Tp>::type>::type type;};
#if _LIBCPP_STD_VER > 11
@@ -1062,10 +1062,10 @@ template <class _Tp> using add_cv_t = typename add_cv<_Tp>::type;
// remove_reference
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_reference {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_reference<_Tp&> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _Tp type;};
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_reference<_Tp&&> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _Tp type;};
#endif
#if _LIBCPP_STD_VER > 11
@@ -1077,7 +1077,7 @@ template <class _Tp> using remove_reference_t = typename remove_reference<_Tp>::
template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_impl { typedef _Tp type; };
template <class _Tp > struct __add_lvalue_reference_impl<_Tp, true> { typedef _Tp& type; };
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_lvalue_reference
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_lvalue_reference
{typedef typename __add_lvalue_reference_impl<_Tp>::type type;};
#if _LIBCPP_STD_VER > 11
@@ -1089,7 +1089,7 @@ template <class _Tp> using add_lvalue_reference_t = typename add_lvalue_referenc
template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_rvalue_reference_impl { typedef _Tp type; };
template <class _Tp > struct __add_rvalue_reference_impl<_Tp, true> { typedef _Tp&& type; };
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_rvalue_reference
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_rvalue_reference
{typedef typename __add_rvalue_reference_impl<_Tp>::type type;};
#if _LIBCPP_STD_VER > 11
@@ -1145,11 +1145,11 @@ struct __any
// remove_pointer
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp*> {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp* const> {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp* volatile> {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_pointer<_Tp* const volatile> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp*> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* volatile> {typedef _Tp type;};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {typedef _Tp type;};
#if _LIBCPP_STD_VER > 11
template <class _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type;
@@ -1165,7 +1165,7 @@ struct __add_pointer_impl
template <class _Tp> struct __add_pointer_impl<_Tp, false>
{typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY add_pointer
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_pointer
{typedef typename __add_pointer_impl<_Tp>::type type;};
#if _LIBCPP_STD_VER > 11
@@ -1185,7 +1185,7 @@ struct __libcpp_is_signed : public __libcpp_is_signed_impl<_Tp> {};
template <class _Tp> struct __libcpp_is_signed<_Tp, false> : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_signed : public __libcpp_is_signed<_Tp> {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_signed : public __libcpp_is_signed<_Tp> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Tp> _LIBCPP_CONSTEXPR bool is_signed_v
@@ -1205,7 +1205,7 @@ struct __libcpp_is_unsigned : public __libcpp_is_unsigned_impl<_Tp> {};
template <class _Tp> struct __libcpp_is_unsigned<_Tp, false> : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_unsigned : public __libcpp_is_unsigned<_Tp> {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Tp> _LIBCPP_CONSTEXPR bool is_unsigned_v
@@ -1214,11 +1214,11 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_unsigned_v
// rank
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY rank
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS rank
: public integral_constant<size_t, 0> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY rank<_Tp[]>
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[]>
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY rank<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]>
: public integral_constant<size_t, rank<_Tp>::value + 1> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -1228,15 +1228,15 @@ template <class _Tp> _LIBCPP_CONSTEXPR size_t rank_v
// extent
-template <class _Tp, unsigned _Ip = 0> struct _LIBCPP_TYPE_VIS_ONLY extent
+template <class _Tp, unsigned _Ip = 0> struct _LIBCPP_TEMPLATE_VIS extent
: public integral_constant<size_t, 0> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[], 0>
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], 0>
: public integral_constant<size_t, 0> {};
-template <class _Tp, unsigned _Ip> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[], _Ip>
+template <class _Tp, unsigned _Ip> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], _Ip>
: public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[_Np], 0>
+template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], 0>
: public integral_constant<size_t, _Np> {};
-template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCPP_TYPE_VIS_ONLY extent<_Tp[_Np], _Ip>
+template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], _Ip>
: public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -1246,11 +1246,11 @@ template <class _Tp, unsigned _Ip = 0> _LIBCPP_CONSTEXPR size_t extent_v
// remove_extent
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_extent
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_extent
{typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_extent<_Tp[]>
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[]>
{typedef _Tp type;};
-template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY remove_extent<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[_Np]>
{typedef _Tp type;};
#if _LIBCPP_STD_VER > 11
@@ -1259,11 +1259,11 @@ template <class _Tp> using remove_extent_t = typename remove_extent<_Tp>::type;
// remove_all_extents
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_all_extents
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_all_extents
{typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY remove_all_extents<_Tp[]>
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[]>
{typedef typename remove_all_extents<_Tp>::type type;};
-template <class _Tp, size_t _Np> struct _LIBCPP_TYPE_VIS_ONLY remove_all_extents<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[_Np]>
{typedef typename remove_all_extents<_Tp>::type type;};
#if _LIBCPP_STD_VER > 11
@@ -1273,7 +1273,7 @@ template <class _Tp> using remove_all_extents_t = typename remove_all_extents<_T
// decay
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY decay
+struct _LIBCPP_TEMPLATE_VIS decay
{
private:
typedef typename remove_reference<_Tp>::type _Up;
@@ -1308,7 +1308,7 @@ struct __libcpp_abstract : public integral_constant<bool, sizeof(__is_abstract_i
template <class _Tp> struct __libcpp_abstract<_Tp, false> : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_abstract : public __libcpp_abstract<_Tp> {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_abstract : public __libcpp_abstract<_Tp> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Tp> _LIBCPP_CONSTEXPR bool is_abstract_v
@@ -1318,15 +1318,15 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_abstract_v
// is_final
#if defined(_LIBCPP_HAS_IS_FINAL)
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS
__libcpp_is_final : public integral_constant<bool, __is_final(_Tp)> {};
#else
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS
__libcpp_is_final : public false_type {};
#endif
#if defined(_LIBCPP_HAS_IS_FINAL) && _LIBCPP_STD_VER > 11
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS
is_final : public integral_constant<bool, __is_final(_Tp)> {};
#endif
@@ -1340,7 +1340,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_final_v
#ifdef _LIBCPP_HAS_IS_BASE_OF
template <class _Bp, class _Dp>
-struct _LIBCPP_TYPE_VIS_ONLY is_base_of
+struct _LIBCPP_TEMPLATE_VIS is_base_of
: public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
#else // _LIBCPP_HAS_IS_BASE_OF
@@ -1364,7 +1364,7 @@ template <class _Bp, class _Dp> __two __test(...);
}
template <class _Bp, class _Dp>
-struct _LIBCPP_TYPE_VIS_ONLY is_base_of
+struct _LIBCPP_TEMPLATE_VIS is_base_of
: public integral_constant<bool, is_class<_Bp>::value &&
sizeof(__is_base_of_imp::__test<_Bp, _Dp>(0)) == 2> {};
@@ -1379,7 +1379,7 @@ template <class _Bp, class _Dp> _LIBCPP_CONSTEXPR bool is_base_of_v
#if __has_feature(is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK)
-template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS_ONLY is_convertible
+template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS is_convertible
: public integral_constant<bool, __is_convertible_to(_T1, _T2) &&
!is_abstract<_T2>::value> {};
@@ -1451,7 +1451,7 @@ template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 3> : public
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 3> : public false_type {};
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 3> : public true_type {};
-template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS_ONLY is_convertible
+template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS is_convertible
: public __is_convertible<_T1, _T2>
{
static const size_t __complete_check1 = __is_convertible_check<_T1>::__v;
@@ -1470,7 +1470,7 @@ template <class _From, class _To> _LIBCPP_CONSTEXPR bool is_convertible_v
#if __has_feature(is_empty) || (_GNUC_VER >= 407)
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_empty
+struct _LIBCPP_TEMPLATE_VIS is_empty
: public integral_constant<bool, __is_empty(_Tp)> {};
#else // __has_feature(is_empty)
@@ -1492,7 +1492,7 @@ struct __libcpp_empty : public integral_constant<bool, sizeof(__is_empty1<_Tp>)
template <class _Tp> struct __libcpp_empty<_Tp, false> : public false_type {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_empty : public __libcpp_empty<_Tp> {};
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_empty : public __libcpp_empty<_Tp> {};
#endif // __has_feature(is_empty)
@@ -1506,7 +1506,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_empty_v
#if __has_feature(is_polymorphic) || defined(_LIBCPP_MSVC)
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_polymorphic
+struct _LIBCPP_TEMPLATE_VIS is_polymorphic
: public integral_constant<bool, __is_polymorphic(_Tp)> {};
#else
@@ -1516,7 +1516,7 @@ template<typename _Tp> char &__is_polymorphic_impl(
int>::type);
template<typename _Tp> __two &__is_polymorphic_impl(...);
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_polymorphic
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_polymorphic
: public integral_constant<bool, sizeof(__is_polymorphic_impl<_Tp>(0)) == 1> {};
#endif // __has_feature(is_polymorphic)
@@ -1530,12 +1530,12 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_polymorphic_v
#if __has_feature(has_virtual_destructor) || (_GNUC_VER >= 403)
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor
: public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
#else
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor
: public false_type {};
#endif
@@ -1547,7 +1547,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool has_virtual_destructor_v
// alignment_of
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY alignment_of
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS alignment_of
: public integral_constant<size_t, __alignof__(_Tp)> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
@@ -1640,7 +1640,7 @@ struct __find_max_align<__type_list<_Hp, _Tp>, _Len>
: public integral_constant<size_t, __select_align<_Len, _Hp::value, __find_max_align<_Tp, _Len>::value>::value> {};
template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
-struct _LIBCPP_TYPE_VIS_ONLY aligned_storage
+struct _LIBCPP_TEMPLATE_VIS aligned_storage
{
typedef typename __find_pod<__all_types, _Align>::type _Aligner;
static_assert(!is_void<_Aligner>::value, "");
@@ -1658,7 +1658,7 @@ template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::valu
#define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \
template <size_t _Len>\
-struct _LIBCPP_TYPE_VIS_ONLY aligned_storage<_Len, n>\
+struct _LIBCPP_TEMPLATE_VIS aligned_storage<_Len, n>\
{\
struct _ALIGNAS(n) type\
{\
@@ -1913,7 +1913,7 @@ template <> struct __make_signed<__uint128_t, true> {typedef __int128_t t
#endif
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY make_signed
+struct _LIBCPP_TEMPLATE_VIS make_signed
{
typedef typename __apply_cv<_Tp, typename __make_signed<typename remove_cv<_Tp>::type>::type>::type type;
};
@@ -1946,7 +1946,7 @@ template <> struct __make_unsigned<__uint128_t, true> {typedef __uint128_
#endif
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY make_unsigned
+struct _LIBCPP_TEMPLATE_VIS make_unsigned
{
typedef typename __apply_cv<_Tp, typename __make_unsigned<typename remove_cv<_Tp>::type>::type>::type type;
};
@@ -1958,21 +1958,21 @@ template <class _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type;
#ifdef _LIBCPP_HAS_NO_VARIADICS
template <class _Tp, class _Up = void, class _Vp = void>
-struct _LIBCPP_TYPE_VIS_ONLY common_type
+struct _LIBCPP_TEMPLATE_VIS common_type
{
public:
typedef typename common_type<typename common_type<_Tp, _Up>::type, _Vp>::type type;
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, void, void>
+struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, void, void>
{
public:
typedef typename decay<_Tp>::type type;
};
template <class _Tp, class _Up>
-struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up, void>
+struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up, void>
{
typedef typename decay<decltype(
true ? _VSTD::declval<_Tp>() : _VSTD::declval<_Up>()
@@ -1984,12 +1984,12 @@ struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up, void>
// bullet 1 - sizeof...(Tp) == 0
template <class ..._Tp>
-struct _LIBCPP_TYPE_VIS_ONLY common_type {};
+struct _LIBCPP_TEMPLATE_VIS common_type {};
// bullet 2 - sizeof...(Tp) == 1
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp>
+struct _LIBCPP_TEMPLATE_VIS common_type<_Tp>
{
typedef typename decay<_Tp>::type type;
};
@@ -2021,7 +2021,7 @@ using __common_type2 =
>::type;
template <class _Tp, class _Up>
-struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up>
+struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up>
: __common_type2<_Tp, _Up> {};
// bullet 4 - sizeof...(Tp) > 2
@@ -2049,7 +2049,7 @@ struct __common_type_impl<__common_types<_Tp, _Up, _Vp...>,
};
template <class _Tp, class _Up, class ..._Vp>
-struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up, _Vp...>
+struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up, _Vp...>
: __common_type_impl<__common_types<_Tp, _Up, _Vp...> > {};
#if _LIBCPP_STD_VER > 11
@@ -2091,7 +2091,7 @@ template <class _Tp, class _Arg> _LIBCPP_CONSTEXPR bool is_assignable_v
// is_copy_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_copy_assignable
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_copy_assignable
: public is_assignable<typename add_lvalue_reference<_Tp>::type,
typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
@@ -2102,7 +2102,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_copy_assignable_v
// is_move_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_move_assignable
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_move_assignable
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
: public is_assignable<typename add_lvalue_reference<_Tp>::type,
typename add_rvalue_reference<_Tp>::type> {};
@@ -2869,7 +2869,7 @@ class __result_of<_Fn(_Tp, _A0, _A1, _A2), false, true> // _Fn must be member p
// result_of
template <class _Fn>
-class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn()>
+class _LIBCPP_TEMPLATE_VIS result_of<_Fn()>
: public __result_of<_Fn(),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value,
@@ -2879,7 +2879,7 @@ class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn()>
};
template <class _Fn, class _A0>
-class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0)>
+class _LIBCPP_TEMPLATE_VIS result_of<_Fn(_A0)>
: public __result_of<_Fn(_A0),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value,
@@ -2889,7 +2889,7 @@ class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0)>
};
template <class _Fn, class _A0, class _A1>
-class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0, _A1)>
+class _LIBCPP_TEMPLATE_VIS result_of<_Fn(_A0, _A1)>
: public __result_of<_Fn(_A0, _A1),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value,
@@ -2899,7 +2899,7 @@ class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0, _A1)>
};
template <class _Fn, class _A0, class _A1, class _A2>
-class _LIBCPP_TYPE_VIS_ONLY result_of<_Fn(_A0, _A1, _A2)>
+class _LIBCPP_TEMPLATE_VIS result_of<_Fn(_A0, _A1, _A2)>
: public __result_of<_Fn(_A0, _A1, _A2),
is_class<typename remove_reference<_Fn>::type>::value ||
is_function<typename remove_pointer<typename remove_reference<_Fn>::type>::type>::value,
@@ -3035,12 +3035,12 @@ struct __libcpp_is_constructible<_Tp&&, _A0>
#if __has_feature(is_constructible)
template <class _Tp, class ..._Args>
-struct _LIBCPP_TYPE_VIS_ONLY is_constructible
+struct _LIBCPP_TEMPLATE_VIS is_constructible
: public integral_constant<bool, __is_constructible(_Tp, _Args...)>
{};
#elif !defined(_LIBCPP_CXX03_LANG)
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS_ONLY is_constructible
+struct _LIBCPP_TEMPLATE_VIS is_constructible
: public __libcpp_is_constructible<_Tp, _Args...>::type {};
#else
// template <class T> struct is_constructible0;
@@ -3154,7 +3154,7 @@ struct __is_constructible2_void_check<true, _Tp, _A0, _A1>
template <class _Tp, class _A0 = __is_construct::__nat,
class _A1 = __is_construct::__nat>
-struct _LIBCPP_TYPE_VIS_ONLY is_constructible
+struct _LIBCPP_TEMPLATE_VIS is_constructible
: public __is_constructible2_void_check<is_void<_Tp>::value
|| is_abstract<_Tp>::value
|| is_function<_Tp>::value
@@ -3164,7 +3164,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_constructible
{};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_constructible<_Tp, __is_construct::__nat, __is_construct::__nat>
+struct _LIBCPP_TEMPLATE_VIS is_constructible<_Tp, __is_construct::__nat, __is_construct::__nat>
: public __is_constructible0_void_check<is_void<_Tp>::value
|| is_abstract<_Tp>::value
|| is_function<_Tp>::value,
@@ -3172,7 +3172,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_constructible<_Tp, __is_construct::__nat, __is_c
{};
template <class _Tp, class _A0>
-struct _LIBCPP_TYPE_VIS_ONLY is_constructible<_Tp, _A0, __is_construct::__nat>
+struct _LIBCPP_TEMPLATE_VIS is_constructible<_Tp, _A0, __is_construct::__nat>
: public __is_constructible1_void_check<is_void<_Tp>::value
|| is_abstract<_Tp>::value
|| is_function<_Tp>::value
@@ -3226,7 +3226,7 @@ template <class _Tp, class ..._Args> _LIBCPP_CONSTEXPR bool is_constructible_v
// is_default_constructible
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_default_constructible
+struct _LIBCPP_TEMPLATE_VIS is_default_constructible
: public is_constructible<_Tp>
{};
@@ -3238,7 +3238,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_default_constructible_v
// is_copy_constructible
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_copy_constructible
+struct _LIBCPP_TEMPLATE_VIS is_copy_constructible
: public is_constructible<_Tp,
typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
@@ -3250,7 +3250,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_copy_constructible_v
// is_move_constructible
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_move_constructible
+struct _LIBCPP_TEMPLATE_VIS is_move_constructible
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
: public is_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
#else
@@ -3270,7 +3270,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_move_constructible_v
#if __has_feature(is_trivially_constructible) || _GNUC_VER >= 501
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible
: integral_constant<bool, __is_trivially_constructible(_Tp, _Args...)>
{
};
@@ -3278,13 +3278,13 @@ struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
#else // !__has_feature(is_trivially_constructible)
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible
: false_type
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp>
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp>
#if __has_feature(has_trivial_constructor) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_trivial_constructor(_Tp)>
#else
@@ -3295,22 +3295,22 @@ struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp>
template <class _Tp>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&&>
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&&>
#else
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp>
#endif
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, const _Tp&>
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, const _Tp&>
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&>
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&>
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
@@ -3321,7 +3321,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&>
template <class _Tp, class _A0 = __is_construct::__nat,
class _A1 = __is_construct::__nat>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible
: false_type
{
};
@@ -3329,28 +3329,28 @@ struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible
#if __has_feature(is_trivially_constructible) || _GNUC_VER >= 501
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, __is_construct::__nat,
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, __is_construct::__nat,
__is_construct::__nat>
: integral_constant<bool, __is_trivially_constructible(_Tp)>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp,
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp,
__is_construct::__nat>
: integral_constant<bool, __is_trivially_constructible(_Tp, _Tp)>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, const _Tp&,
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, const _Tp&,
__is_construct::__nat>
: integral_constant<bool, __is_trivially_constructible(_Tp, const _Tp&)>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&,
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&,
__is_construct::__nat>
: integral_constant<bool, __is_trivially_constructible(_Tp, _Tp&)>
{
@@ -3359,28 +3359,28 @@ struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&,
#else // !__has_feature(is_trivially_constructible)
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, __is_construct::__nat,
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, __is_construct::__nat,
__is_construct::__nat>
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp,
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp,
__is_construct::__nat>
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, const _Tp&,
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, const _Tp&,
__is_construct::__nat>
: integral_constant<bool, is_scalar<_Tp>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&,
+struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&,
__is_construct::__nat>
: integral_constant<bool, is_scalar<_Tp>::value>
{
@@ -3397,7 +3397,7 @@ template <class _Tp, class... _Args> _LIBCPP_CONSTEXPR bool is_trivially_constru
// is_trivially_default_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_default_constructible
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_default_constructible
: public is_trivially_constructible<_Tp>
{};
@@ -3408,7 +3408,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_default_constructible_v
// is_trivially_copy_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copy_constructible
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_constructible
: public is_trivially_constructible<_Tp, typename add_lvalue_reference<const _Tp>::type>
{};
@@ -3419,7 +3419,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_copy_constructible_v
// is_trivially_move_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_move_constructible
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_move_constructible
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
: public is_trivially_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
#else
@@ -3477,7 +3477,7 @@ template <class _Tp, class _Arg> _LIBCPP_CONSTEXPR bool is_trivially_assignable_
// is_trivially_copy_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copy_assignable
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_assignable
: public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type,
typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
@@ -3488,7 +3488,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_copy_assignable_v
// is_trivially_move_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_move_assignable
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_move_assignable
: public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type,
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typename add_rvalue_reference<_Tp>::type>
@@ -3506,7 +3506,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_move_assignable_v
#if __has_feature(has_trivial_destructor) || (_GNUC_VER >= 403)
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
: public integral_constant<bool, is_destructible<_Tp>::value && __has_trivial_destructor(_Tp)> {};
#else
@@ -3515,10 +3515,10 @@ template <class _Tp> struct __libcpp_trivial_destructor
: public integral_constant<bool, is_scalar<_Tp>::value ||
is_reference<_Tp>::value> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
: public __libcpp_trivial_destructor<typename remove_all_extents<_Tp>::type> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible<_Tp[]>
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible<_Tp[]>
: public false_type {};
#endif
@@ -3532,7 +3532,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_destructible_v
#if 0
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible
: public integral_constant<bool, __is_nothrow_constructible(_Tp(_Args...))>
{
};
@@ -3567,13 +3567,13 @@ struct __libcpp_is_nothrow_constructible</*is constructible*/false, _IsReference
};
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible
: __libcpp_is_nothrow_constructible<is_constructible<_Tp, _Args...>::value, is_reference<_Tp>::value, _Tp, _Args...>
{
};
template <class _Tp, size_t _Ns>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp[_Ns]>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp[_Ns]>
: __libcpp_is_nothrow_constructible<is_constructible<_Tp>::value, is_reference<_Tp>::value, _Tp>
{
};
@@ -3581,13 +3581,13 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp[_Ns]>
#else // __has_feature(cxx_noexcept)
template <class _Tp, class... _Args>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible
: false_type
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp>
#if __has_feature(has_nothrow_constructor) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_constructor(_Tp)>
#else
@@ -3598,9 +3598,9 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp>
template <class _Tp>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&&>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp&&>
#else
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp>
#endif
#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
@@ -3611,7 +3611,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp>
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, const _Tp&>
#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
#else
@@ -3621,7 +3621,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&>
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp&>
#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
#else
@@ -3636,13 +3636,13 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&>
template <class _Tp, class _A0 = __is_construct::__nat,
class _A1 = __is_construct::__nat>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible
: false_type
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, __is_construct::__nat,
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, __is_construct::__nat,
__is_construct::__nat>
#if __has_feature(has_nothrow_constructor) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_constructor(_Tp)>
@@ -3653,7 +3653,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, __is_construct::__nat
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp,
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp,
__is_construct::__nat>
#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
@@ -3664,7 +3664,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp,
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&,
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, const _Tp&,
__is_construct::__nat>
#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
@@ -3675,7 +3675,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, const _Tp&,
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&,
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp&,
__is_construct::__nat>
#if __has_feature(has_nothrow_copy) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_copy(_Tp)>
@@ -3695,7 +3695,7 @@ template <class _Tp, class ..._Args> _LIBCPP_CONSTEXPR bool is_nothrow_construct
// is_nothrow_default_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_default_constructible
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_default_constructible
: public is_nothrow_constructible<_Tp>
{};
@@ -3706,7 +3706,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_default_constructible_v
// is_nothrow_copy_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_copy_constructible
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible
: public is_nothrow_constructible<_Tp,
typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
@@ -3717,7 +3717,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_copy_constructible_v
// is_nothrow_move_constructible
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_move_constructible
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
: public is_nothrow_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
#else
@@ -3749,7 +3749,7 @@ struct __libcpp_is_nothrow_assignable<true, _Tp, _Arg>
};
template <class _Tp, class _Arg>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable
: public __libcpp_is_nothrow_assignable<is_assignable<_Tp, _Arg>::value, _Tp, _Arg>
{
};
@@ -3757,11 +3757,11 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable
#else // __has_feature(cxx_noexcept)
template <class _Tp, class _Arg>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable
: public false_type {};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable<_Tp&, _Tp>
#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_assign(_Tp)> {};
#else
@@ -3769,7 +3769,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp>
#endif
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp&>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable<_Tp&, _Tp&>
#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_assign(_Tp)> {};
#else
@@ -3777,7 +3777,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, _Tp&>
#endif
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_assignable<_Tp&, const _Tp&>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable<_Tp&, const _Tp&>
#if __has_feature(has_nothrow_assign) || (_GNUC_VER >= 403)
: integral_constant<bool, __has_nothrow_assign(_Tp)> {};
#else
@@ -3805,7 +3805,7 @@ template <class _Tp, class _Arg> _LIBCPP_CONSTEXPR bool is_nothrow_assignable_v
// is_nothrow_copy_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_copy_assignable
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_assignable
: public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type,
typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
@@ -3816,7 +3816,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_copy_assignable_v
// is_nothrow_move_assignable
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_move_assignable
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
: public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type,
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
typename add_rvalue_reference<_Tp>::type>
@@ -3849,19 +3849,19 @@ struct __libcpp_is_nothrow_destructible<true, _Tp>
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
: public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp>
{
};
template <class _Tp, size_t _Ns>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp[_Ns]>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[_Ns]>
: public is_nothrow_destructible<_Tp>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp&>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&>
: public true_type
{
};
@@ -3869,7 +3869,7 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp&>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp&&>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&&>
: public true_type
{
};
@@ -3882,11 +3882,11 @@ template <class _Tp> struct __libcpp_nothrow_destructor
: public integral_constant<bool, is_scalar<_Tp>::value ||
is_reference<_Tp>::value> {};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
: public __libcpp_nothrow_destructor<typename remove_all_extents<_Tp>::type> {};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp[]>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[]>
: public false_type {};
#endif
@@ -3900,12 +3900,12 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_nothrow_destructible_v
#if __has_feature(is_pod) || (_GNUC_VER >= 403)
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pod
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod
: public integral_constant<bool, __is_pod(_Tp)> {};
#else
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_pod
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod
: public integral_constant<bool, is_trivially_default_constructible<_Tp>::value &&
is_trivially_copy_constructible<_Tp>::value &&
is_trivially_copy_assignable<_Tp>::value &&
@@ -3920,7 +3920,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_pod_v
// is_literal_type;
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_literal_type
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_literal_type
#ifdef _LIBCPP_IS_LITERAL
: public integral_constant<bool, _LIBCPP_IS_LITERAL(_Tp)>
#else
@@ -3936,7 +3936,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_literal_type_v
// is_standard_layout;
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_standard_layout
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_standard_layout
#if __has_feature(is_standard_layout) || (_GNUC_VER >= 407)
: public integral_constant<bool, __is_standard_layout(_Tp)>
#else
@@ -3951,7 +3951,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_standard_layout_v
// is_trivially_copyable;
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copyable
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copyable
#if __has_feature(is_trivially_copyable)
: public integral_constant<bool, __is_trivially_copyable(_Tp)>
#elif _GNUC_VER >= 501
@@ -3968,7 +3968,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_trivially_copyable_v
// is_trivial;
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivial
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivial
#if __has_feature(is_trivial) || _GNUC_VER >= 407
: public integral_constant<bool, __is_trivial(_Tp)>
#else
@@ -4375,7 +4375,7 @@ struct __invoke_of
// result_of
template <class _Fp, class ..._Args>
-class _LIBCPP_TYPE_VIS_ONLY result_of<_Fp(_Args...)>
+class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)>
: public __invoke_of<_Fp, _Args...>
{
};
@@ -4389,10 +4389,10 @@ template <class _Tp> using result_of_t = typename result_of<_Tp>::type;
// is_callable
template <class _Fn, class _Ret = void>
-struct _LIBCPP_TYPE_VIS_ONLY is_callable;
+struct _LIBCPP_TEMPLATE_VIS is_callable;
template <class _Fn, class ..._Args, class _Ret>
-struct _LIBCPP_TYPE_VIS_ONLY is_callable<_Fn(_Args...), _Ret>
+struct _LIBCPP_TEMPLATE_VIS is_callable<_Fn(_Args...), _Ret>
: integral_constant<bool, __invokable_r<_Ret, _Fn, _Args...>::value> {};
template <class _Fn, class _Ret = void>
@@ -4401,10 +4401,10 @@ constexpr bool is_callable_v = is_callable<_Fn, _Ret>::value;
// is_nothrow_callable
template <class _Fn, class _Ret = void>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_callable;
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_callable;
template <class _Fn, class ..._Args, class _Ret>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_callable<_Fn(_Args...), _Ret>
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_callable<_Fn(_Args...), _Ret>
: integral_constant<bool, __nothrow_invokable_r<_Ret, _Fn, _Args...>::value>
{};
@@ -4513,13 +4513,13 @@ struct __is_nothrow_swappable
#if _LIBCPP_STD_VER > 14
template <class _Tp, class _Up>
-struct _LIBCPP_TYPE_VIS_ONLY is_swappable_with
+struct _LIBCPP_TEMPLATE_VIS is_swappable_with
: public integral_constant<bool, __detail::__swappable_with<_Tp, _Up>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_swappable
+struct _LIBCPP_TEMPLATE_VIS is_swappable
: public conditional<
__is_referenceable<_Tp>::value,
is_swappable_with<
@@ -4531,13 +4531,13 @@ struct _LIBCPP_TYPE_VIS_ONLY is_swappable
};
template <class _Tp, class _Up>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_swappable_with
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable_with
: public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp, _Up>::value>
{
};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_swappable
+struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable
: public conditional<
__is_referenceable<_Tp>::value,
is_nothrow_swappable_with<
diff --git a/include/typeindex b/include/typeindex
index d4d6ca96ba4d..0565ca913e33 100644
--- a/include/typeindex
+++ b/include/typeindex
@@ -55,7 +55,7 @@ struct hash<type_index>
_LIBCPP_BEGIN_NAMESPACE_STD
-class _LIBCPP_TYPE_VIS_ONLY type_index
+class _LIBCPP_TEMPLATE_VIS type_index
{
const type_info* __t_;
public:
@@ -87,10 +87,10 @@ public:
const char* name() const _NOEXCEPT {return __t_->name();}
};
-template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY hash;
+template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<type_index>
+struct _LIBCPP_TEMPLATE_VIS hash<type_index>
: public unary_function<type_index, size_t>
{
_LIBCPP_INLINE_VISIBILITY
diff --git a/include/typeinfo b/include/typeinfo
index 9b14cb36048e..9b21da6b9341 100644
--- a/include/typeinfo
+++ b/include/typeinfo
@@ -69,6 +69,12 @@ public:
#pragma GCC system_header
#endif
+#if defined(_LIBCPP_NONUNIQUE_RTTI_BIT)
+#define _LIBCPP_HAS_NONUNIQUE_TYPEINFO
+#else
+#define _LIBCPP_HAS_UNIQUE_TYPEINFO
+#endif
+
namespace std // purposefully not using versioning namespace
{
@@ -77,76 +83,89 @@ class _LIBCPP_EXCEPTION_ABI type_info
type_info& operator=(const type_info&);
type_info(const type_info&);
+#if defined(_LIBCPP_HAS_NONUNIQUE_TYPEINFO)
+ _LIBCPP_INLINE_VISIBILITY
+ int __compare_nonunique_names(const type_info &__arg) const _NOEXCEPT
+ { return __builtin_strcmp(name(), __arg.name()); }
+#endif
+
protected:
-#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
- const char* __type_name;
-#else
+#if defined(_LIBCPP_HAS_NONUNIQUE_TYPEINFO)
// A const char* with the non-unique RTTI bit possibly set.
uintptr_t __type_name;
-#endif
_LIBCPP_INLINE_VISIBILITY
- explicit type_info(const char* __n)
-#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
- : __type_name(__n) {}
+ type_info(const char* __n) : __type_name(reinterpret_cast<uintptr_t>(__n)) {}
#else
- : __type_name(reinterpret_cast<uintptr_t>(__n)) {}
+ const char *__type_name;
+
+ _LIBCPP_INLINE_VISIBILITY
+ type_info(const char* __n) : __type_name(__n) {}
#endif
public:
virtual ~type_info();
+#if defined(_LIBCPP_HAS_NONUNIQUE_TYPEINFO)
_LIBCPP_INLINE_VISIBILITY
const char* name() const _NOEXCEPT
-#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
- {return __type_name;}
-#else
- {return reinterpret_cast<const char*>(__type_name & ~_LIBCPP_NONUNIQUE_RTTI_BIT);}
-#endif
+ {
+ return reinterpret_cast<const char*>(__type_name &
+ ~_LIBCPP_NONUNIQUE_RTTI_BIT);
+ }
_LIBCPP_INLINE_VISIBILITY
bool before(const type_info& __arg) const _NOEXCEPT
-#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
- {return __type_name < __arg.__type_name;}
-#else
- {if (!((__type_name & __arg.__type_name) & _LIBCPP_NONUNIQUE_RTTI_BIT))
- return __type_name < __arg.__type_name;
- return __compare_nonunique_names(__arg) < 0;}
-#endif
+ {
+ if (!((__type_name & __arg.__type_name) & _LIBCPP_NONUNIQUE_RTTI_BIT))
+ return __type_name < __arg.__type_name;
+ return __compare_nonunique_names(__arg) < 0;
+ }
_LIBCPP_INLINE_VISIBILITY
size_t hash_code() const _NOEXCEPT
-#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
- {return reinterpret_cast<size_t>(__type_name);}
-#else
- {if (!(__type_name & _LIBCPP_NONUNIQUE_RTTI_BIT)) return __type_name;
- const char *__ptr = name();
- size_t __hash = 5381;
- while (unsigned char __c = static_cast<unsigned char>(*__ptr++))
- __hash = (__hash * 33) ^ __c;
- return __hash;}
-#endif
+ {
+ if (!(__type_name & _LIBCPP_NONUNIQUE_RTTI_BIT))
+ return __type_name;
+
+ const char* __ptr = name();
+ size_t __hash = 5381;
+ while (unsigned char __c = static_cast<unsigned char>(*__ptr++))
+ __hash = (__hash * 33) ^ __c;
+ return __hash;
+ }
_LIBCPP_INLINE_VISIBILITY
bool operator==(const type_info& __arg) const _NOEXCEPT
-#ifndef _LIBCPP_NONUNIQUE_RTTI_BIT
- {return __type_name == __arg.__type_name;}
+ {
+ if (__type_name == __arg.__type_name)
+ return true;
+
+ if (!((__type_name & __arg.__type_name) & _LIBCPP_NONUNIQUE_RTTI_BIT))
+ return false;
+ return __compare_nonunique_names(__arg) == 0;
+ }
#else
- {if (__type_name == __arg.__type_name) return true;
- if (!((__type_name & __arg.__type_name) & _LIBCPP_NONUNIQUE_RTTI_BIT))
- return false;
- return __compare_nonunique_names(__arg) == 0;}
-#endif
_LIBCPP_INLINE_VISIBILITY
- bool operator!=(const type_info& __arg) const _NOEXCEPT
- {return !operator==(__arg);}
+ const char* name() const _NOEXCEPT
+ { return __type_name; }
-#ifdef _LIBCPP_NONUNIQUE_RTTI_BIT
- private:
_LIBCPP_INLINE_VISIBILITY
- int __compare_nonunique_names(const type_info &__arg) const _NOEXCEPT
- {return __builtin_strcmp(name(), __arg.name());}
+ bool before(const type_info& __arg) const _NOEXCEPT
+ { return __type_name < __arg.__type_name; }
+
+ _LIBCPP_INLINE_VISIBILITY
+ size_t hash_code() const _NOEXCEPT
+ { return reinterpret_cast<size_t>(__type_name); }
+
+ _LIBCPP_INLINE_VISIBILITY
+ bool operator==(const type_info& __arg) const _NOEXCEPT
+ { return __type_name == __arg.__type_name; }
#endif
+
+ _LIBCPP_INLINE_VISIBILITY
+ bool operator!=(const type_info& __arg) const _NOEXCEPT
+ { return !operator==(__arg); }
};
class _LIBCPP_EXCEPTION_ABI bad_cast
diff --git a/include/unordered_map b/include/unordered_map
index dc8db8085197..7baf638833f0 100644
--- a/include/unordered_map
+++ b/include/unordered_map
@@ -641,7 +641,7 @@ private:
#endif
template <class _HashIterator>
-class _LIBCPP_TYPE_VIS_ONLY __hash_map_iterator
+class _LIBCPP_TEMPLATE_VIS __hash_map_iterator
{
_HashIterator __i_;
@@ -682,15 +682,15 @@ public:
bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
{return __x.__i_ != __y.__i_;}
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_map;
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
};
template <class _HashIterator>
-class _LIBCPP_TYPE_VIS_ONLY __hash_map_const_iterator
+class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator
{
_HashIterator __i_;
@@ -736,15 +736,15 @@ public:
bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
{return __x.__i_ != __y.__i_;}
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_map;
- template <class, class, class, class, class> friend class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_iterator;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY __hash_const_local_iterator;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
};
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
class _Alloc = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TYPE_VIS_ONLY unordered_map
+class _LIBCPP_TEMPLATE_VIS unordered_map
{
public:
// types
@@ -1513,7 +1513,7 @@ operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
class _Alloc = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TYPE_VIS_ONLY unordered_multimap
+class _LIBCPP_TEMPLATE_VIS unordered_multimap
{
public:
// types
diff --git a/include/unordered_set b/include/unordered_set
index fb38b648a86a..fc53c8271109 100644
--- a/include/unordered_set
+++ b/include/unordered_set
@@ -333,7 +333,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
-class _LIBCPP_TYPE_VIS_ONLY unordered_set
+class _LIBCPP_TEMPLATE_VIS unordered_set
{
public:
// types
@@ -873,7 +873,7 @@ operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
-class _LIBCPP_TYPE_VIS_ONLY unordered_multiset
+class _LIBCPP_TEMPLATE_VIS unordered_multiset
{
public:
// types
diff --git a/include/utility b/include/utility
index 364221433a8a..cc0646cbd270 100644
--- a/include/utility
+++ b/include/utility
@@ -289,7 +289,7 @@ template <class _Tp> constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { r
template <class _Tp> void as_const(const _Tp&&) = delete;
#endif
-struct _LIBCPP_TYPE_VIS_ONLY piecewise_construct_t { };
+struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { };
#if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_UTILITY)
extern const piecewise_construct_t piecewise_construct;// = piecewise_construct_t();
#else
@@ -306,7 +306,7 @@ struct __non_trivially_copyable_base {
#endif
template <class _T1, class _T2>
-struct _LIBCPP_TYPE_VIS_ONLY pair
+struct _LIBCPP_TEMPLATE_VIS pair
#if defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
: private __non_trivially_copyable_base
#endif
@@ -648,18 +648,18 @@ make_pair(_T1 __x, _T2 __y)
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _T1, class _T2>
- class _LIBCPP_TYPE_VIS_ONLY tuple_size<pair<_T1, _T2> >
+ class _LIBCPP_TEMPLATE_VIS tuple_size<pair<_T1, _T2> >
: public integral_constant<size_t, 2> {};
template <class _T1, class _T2>
-class _LIBCPP_TYPE_VIS_ONLY tuple_element<0, pair<_T1, _T2> >
+class _LIBCPP_TEMPLATE_VIS tuple_element<0, pair<_T1, _T2> >
{
public:
typedef _T1 type;
};
template <class _T1, class _T2>
-class _LIBCPP_TYPE_VIS_ONLY tuple_element<1, pair<_T1, _T2> >
+class _LIBCPP_TEMPLATE_VIS tuple_element<1, pair<_T1, _T2> >
{
public:
typedef _T2 type;
@@ -829,7 +829,7 @@ constexpr _T1 const && get(pair<_T2, _T1> const&& __p) _NOEXCEPT
#if _LIBCPP_STD_VER > 11
template<class _Tp, _Tp... _Ip>
-struct _LIBCPP_TYPE_VIS_ONLY integer_sequence
+struct _LIBCPP_TEMPLATE_VIS integer_sequence
{
typedef _Tp value_type;
static_assert( is_integral<_Tp>::value,
diff --git a/include/valarray b/include/valarray
index 2325c54f7c6d..f70304bbd15b 100644
--- a/include/valarray
+++ b/include/valarray
@@ -356,9 +356,9 @@ template <class T> unspecified2 end(const valarray<T>& v);
_LIBCPP_BEGIN_NAMESPACE_STD
-template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY valarray;
+template<class _Tp> class _LIBCPP_TEMPLATE_VIS valarray;
-class _LIBCPP_TYPE_VIS_ONLY slice
+class _LIBCPP_TEMPLATE_VIS slice
{
size_t __start_;
size_t __size_;
@@ -383,11 +383,11 @@ public:
_LIBCPP_INLINE_VISIBILITY size_t stride() const {return __stride_;}
};
-template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY slice_array;
+template <class _Tp> class _LIBCPP_TEMPLATE_VIS slice_array;
class _LIBCPP_TYPE_VIS gslice;
-template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY gslice_array;
-template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY mask_array;
-template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY indirect_array;
+template <class _Tp> class _LIBCPP_TEMPLATE_VIS gslice_array;
+template <class _Tp> class _LIBCPP_TEMPLATE_VIS mask_array;
+template <class _Tp> class _LIBCPP_TEMPLATE_VIS indirect_array;
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
@@ -673,7 +673,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
size_t size() const {return __size_;}
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY valarray;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS valarray;
};
template <class _ValExpr>
@@ -788,7 +788,7 @@ template<class _Tp>
struct __is_val_expr<valarray<_Tp> > : true_type {};
template<class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY valarray
+class _LIBCPP_TEMPLATE_VIS valarray
{
public:
typedef _Tp value_type;
@@ -1028,12 +1028,12 @@ public:
void resize(size_t __n, value_type __x = value_type());
private:
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY valarray;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY slice_array;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY gslice_array;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY mask_array;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS valarray;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS slice_array;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS gslice_array;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS mask_array;
template <class> friend class __mask_expr;
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY indirect_array;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS indirect_array;
template <class> friend class __indirect_expr;
template <class> friend class __val_expr;
@@ -1147,7 +1147,7 @@ struct _BinaryOp<_Op, valarray<_Tp>, valarray<_Tp> >
// slice_array
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY slice_array
+class _LIBCPP_TEMPLATE_VIS slice_array
{
public:
typedef _Tp value_type;
@@ -1531,7 +1531,7 @@ private:
// gslice_array
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY gslice_array
+class _LIBCPP_TEMPLATE_VIS gslice_array
{
public:
typedef _Tp value_type;
@@ -1869,7 +1869,7 @@ gslice_array<_Tp>::operator=(const value_type& __x) const
// mask_array
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY mask_array
+class _LIBCPP_TEMPLATE_VIS mask_array
{
public:
typedef _Tp value_type;
@@ -2227,7 +2227,7 @@ public:
// indirect_array
template <class _Tp>
-class _LIBCPP_TYPE_VIS_ONLY indirect_array
+class _LIBCPP_TEMPLATE_VIS indirect_array
{
public:
typedef _Tp value_type;
@@ -2591,7 +2591,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
size_t size() const {return __1d_.size();}
- template <class> friend class _LIBCPP_TYPE_VIS_ONLY valarray;
+ template <class> friend class _LIBCPP_TEMPLATE_VIS valarray;
};
template<class _ValExpr>
diff --git a/include/variant b/include/variant
index fcbad951f7d9..f623cddc2002 100644
--- a/include/variant
+++ b/include/variant
@@ -236,48 +236,48 @@ void __throw_bad_variant_access() {
}
template <class... _Types>
-class _LIBCPP_TYPE_VIS_ONLY variant;
+class _LIBCPP_TEMPLATE_VIS variant;
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY variant_size;
+struct _LIBCPP_TEMPLATE_VIS variant_size;
template <class _Tp>
constexpr size_t variant_size_v = variant_size<_Tp>::value;
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY variant_size<const _Tp> : variant_size<_Tp> {};
+struct _LIBCPP_TEMPLATE_VIS variant_size<const _Tp> : variant_size<_Tp> {};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY variant_size<volatile _Tp> : variant_size<_Tp> {};
+struct _LIBCPP_TEMPLATE_VIS variant_size<volatile _Tp> : variant_size<_Tp> {};
template <class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY variant_size<const volatile _Tp>
+struct _LIBCPP_TEMPLATE_VIS variant_size<const volatile _Tp>
: variant_size<_Tp> {};
template <class... _Types>
-struct _LIBCPP_TYPE_VIS_ONLY variant_size<variant<_Types...>>
+struct _LIBCPP_TEMPLATE_VIS variant_size<variant<_Types...>>
: integral_constant<size_t, sizeof...(_Types)> {};
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY variant_alternative;
+struct _LIBCPP_TEMPLATE_VIS variant_alternative;
template <size_t _Ip, class _Tp>
using variant_alternative_t = typename variant_alternative<_Ip, _Tp>::type;
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY variant_alternative<_Ip, const _Tp>
+struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const _Tp>
: add_const<variant_alternative_t<_Ip, _Tp>> {};
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY variant_alternative<_Ip, volatile _Tp>
+struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, volatile _Tp>
: add_volatile<variant_alternative_t<_Ip, _Tp>> {};
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY variant_alternative<_Ip, const volatile _Tp>
+struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const volatile _Tp>
: add_cv<variant_alternative_t<_Ip, _Tp>> {};
template <size_t _Ip, class... _Types>
-struct _LIBCPP_TYPE_VIS_ONLY variant_alternative<_Ip, variant<_Types...>> {
+struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> {
static_assert(_Ip < sizeof...(_Types));
using type = __type_pack_element<_Ip, _Types...>;
};
@@ -591,7 +591,7 @@ private:
} // namespace __visitation
template <size_t _Index, class _Tp>
-struct _LIBCPP_TYPE_VIS_ONLY __alt {
+struct _LIBCPP_TEMPLATE_VIS __alt {
using __value_type = _Tp;
template <class... _Args>
@@ -603,14 +603,14 @@ struct _LIBCPP_TYPE_VIS_ONLY __alt {
};
template <_Trait _DestructibleTrait, size_t _Index, class... _Types>
-union _LIBCPP_TYPE_VIS_ONLY __union;
+union _LIBCPP_TEMPLATE_VIS __union;
template <_Trait _DestructibleTrait, size_t _Index>
-union _LIBCPP_TYPE_VIS_ONLY __union<_DestructibleTrait, _Index> {};
+union _LIBCPP_TEMPLATE_VIS __union<_DestructibleTrait, _Index> {};
#define _LIBCPP_VARIANT_UNION(destructible_trait, destructor) \
template <size_t _Index, class _Tp, class... _Types> \
- union _LIBCPP_TYPE_VIS_ONLY __union<destructible_trait, \
+ union _LIBCPP_TEMPLATE_VIS __union<destructible_trait, \
_Index, \
_Tp, \
_Types...> { \
@@ -651,7 +651,7 @@ _LIBCPP_VARIANT_UNION(_Trait::_Unavailable, ~__union() = delete;);
#undef _LIBCPP_VARIANT_UNION
template <_Trait _DestructibleTrait, class... _Types>
-class _LIBCPP_TYPE_VIS_ONLY __base {
+class _LIBCPP_TEMPLATE_VIS __base {
public:
inline _LIBCPP_INLINE_VISIBILITY
explicit constexpr __base(__valueless_t tag) noexcept
@@ -698,11 +698,11 @@ protected:
};
template <class _Traits, _Trait = _Traits::__destructible_trait>
-class _LIBCPP_TYPE_VIS_ONLY __destructor;
+class _LIBCPP_TEMPLATE_VIS __destructor;
#define _LIBCPP_VARIANT_DESTRUCTOR(destructible_trait, destructor, destroy) \
template <class... _Types> \
- class _LIBCPP_TYPE_VIS_ONLY __destructor<__traits<_Types...>, \
+ class _LIBCPP_TEMPLATE_VIS __destructor<__traits<_Types...>, \
destructible_trait> \
: public __base<destructible_trait, _Types...> { \
using __base_type = __base<destructible_trait, _Types...>; \
@@ -750,7 +750,7 @@ _LIBCPP_VARIANT_DESTRUCTOR(
#undef _LIBCPP_VARIANT_DESTRUCTOR
template <class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY __constructor : public __destructor<_Traits> {
+class _LIBCPP_TEMPLATE_VIS __constructor : public __destructor<_Traits> {
using __base_type = __destructor<_Traits>;
public:
@@ -784,12 +784,12 @@ protected:
};
template <class _Traits, _Trait = _Traits::__move_constructible_trait>
-class _LIBCPP_TYPE_VIS_ONLY __move_constructor;
+class _LIBCPP_TEMPLATE_VIS __move_constructor;
#define _LIBCPP_VARIANT_MOVE_CONSTRUCTOR(move_constructible_trait, \
move_constructor) \
template <class... _Types> \
- class _LIBCPP_TYPE_VIS_ONLY __move_constructor<__traits<_Types...>, \
+ class _LIBCPP_TEMPLATE_VIS __move_constructor<__traits<_Types...>, \
move_constructible_trait> \
: public __constructor<__traits<_Types...>> { \
using __base_type = __constructor<__traits<_Types...>>; \
@@ -824,12 +824,12 @@ _LIBCPP_VARIANT_MOVE_CONSTRUCTOR(
#undef _LIBCPP_VARIANT_MOVE_CONSTRUCTOR
template <class _Traits, _Trait = _Traits::__copy_constructible_trait>
-class _LIBCPP_TYPE_VIS_ONLY __copy_constructor;
+class _LIBCPP_TEMPLATE_VIS __copy_constructor;
#define _LIBCPP_VARIANT_COPY_CONSTRUCTOR(copy_constructible_trait, \
copy_constructor) \
template <class... _Types> \
- class _LIBCPP_TYPE_VIS_ONLY __copy_constructor<__traits<_Types...>, \
+ class _LIBCPP_TEMPLATE_VIS __copy_constructor<__traits<_Types...>, \
copy_constructible_trait> \
: public __move_constructor<__traits<_Types...>> { \
using __base_type = __move_constructor<__traits<_Types...>>; \
@@ -863,7 +863,7 @@ _LIBCPP_VARIANT_COPY_CONSTRUCTOR(
#undef _LIBCPP_VARIANT_COPY_CONSTRUCTOR
template <class _Traits>
-class _LIBCPP_TYPE_VIS_ONLY __assignment : public __copy_constructor<_Traits> {
+class _LIBCPP_TEMPLATE_VIS __assignment : public __copy_constructor<_Traits> {
using __base_type = __copy_constructor<_Traits>;
public:
@@ -924,12 +924,12 @@ protected:
};
template <class _Traits, _Trait = _Traits::__move_assignable_trait>
-class _LIBCPP_TYPE_VIS_ONLY __move_assignment;
+class _LIBCPP_TEMPLATE_VIS __move_assignment;
#define _LIBCPP_VARIANT_MOVE_ASSIGNMENT(move_assignable_trait, \
move_assignment) \
template <class... _Types> \
- class _LIBCPP_TYPE_VIS_ONLY __move_assignment<__traits<_Types...>, \
+ class _LIBCPP_TEMPLATE_VIS __move_assignment<__traits<_Types...>, \
move_assignable_trait> \
: public __assignment<__traits<_Types...>> { \
using __base_type = __assignment<__traits<_Types...>>; \
@@ -965,12 +965,12 @@ _LIBCPP_VARIANT_MOVE_ASSIGNMENT(
#undef _LIBCPP_VARIANT_MOVE_ASSIGNMENT
template <class _Traits, _Trait = _Traits::__copy_assignable_trait>
-class _LIBCPP_TYPE_VIS_ONLY __copy_assignment;
+class _LIBCPP_TEMPLATE_VIS __copy_assignment;
#define _LIBCPP_VARIANT_COPY_ASSIGNMENT(copy_assignable_trait, \
copy_assignment) \
template <class... _Types> \
- class _LIBCPP_TYPE_VIS_ONLY __copy_assignment<__traits<_Types...>, \
+ class _LIBCPP_TEMPLATE_VIS __copy_assignment<__traits<_Types...>, \
copy_assignable_trait> \
: public __move_assignment<__traits<_Types...>> { \
using __base_type = __move_assignment<__traits<_Types...>>; \
@@ -1004,7 +1004,7 @@ _LIBCPP_VARIANT_COPY_ASSIGNMENT(
#undef _LIBCPP_VARIANT_COPY_ASSIGNMENT
template <class... _Types>
-class _LIBCPP_TYPE_VIS_ONLY __impl
+class _LIBCPP_TEMPLATE_VIS __impl
: public __copy_assignment<__traits<_Types...>> {
using __base_type = __copy_assignment<__traits<_Types...>>;
@@ -1085,7 +1085,7 @@ using __best_match_t = typename result_of_t<__overload<_Types...>(_Tp&&)>::type;
} // __variant_detail
template <class... _Types>
-class _LIBCPP_TYPE_VIS_ONLY variant
+class _LIBCPP_TEMPLATE_VIS variant
: private __sfinae_ctor_base<
__all<is_copy_constructible_v<_Types>...>::value,
__all<is_move_constructible_v<_Types>...>::value>,
@@ -1500,7 +1500,7 @@ constexpr decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) {
_VSTD::forward<_Vs>(__vs)...);
}
-struct _LIBCPP_TYPE_VIS_ONLY monostate {};
+struct _LIBCPP_TEMPLATE_VIS monostate {};
inline _LIBCPP_INLINE_VISIBILITY
constexpr bool operator<(monostate, monostate) noexcept { return false; }
@@ -1529,7 +1529,7 @@ auto swap(variant<_Types...>& __lhs,
}
template <class... _Types>
-struct _LIBCPP_TYPE_VIS_ONLY hash<variant<_Types...>> {
+struct _LIBCPP_TEMPLATE_VIS hash<variant<_Types...>> {
using argument_type = variant<_Types...>;
using result_type = size_t;
@@ -1551,7 +1551,7 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<variant<_Types...>> {
};
template <>
-struct _LIBCPP_TYPE_VIS_ONLY hash<monostate> {
+struct _LIBCPP_TEMPLATE_VIS hash<monostate> {
using argument_type = monostate;
using result_type = size_t;
diff --git a/include/vector b/include/vector
index 0e014d4bed13..4dd0e527ff57 100644
--- a/include/vector
+++ b/include/vector
@@ -447,7 +447,7 @@ __vector_base<_Tp, _Allocator>::~__vector_base()
}
template <class _Tp, class _Allocator /* = allocator<_Tp> */>
-class _LIBCPP_TYPE_VIS_ONLY vector
+class _LIBCPP_TEMPLATE_VIS vector
: private __vector_base<_Tp, _Allocator>
{
private:
@@ -2133,7 +2133,7 @@ struct __has_storage_type<vector<bool, _Allocator> >
};
template <class _Allocator>
-class _LIBCPP_TYPE_VIS_ONLY vector<bool, _Allocator>
+class _LIBCPP_TEMPLATE_VIS vector<bool, _Allocator>
: private __vector_base_common<true>
{
public:
@@ -2472,7 +2472,7 @@ private:
friend class __bit_iterator<vector, false>;
friend class __bit_iterator<vector, true>;
friend struct __bit_array<vector>;
- friend struct _LIBCPP_TYPE_VIS_ONLY hash<vector>;
+ friend struct _LIBCPP_TEMPLATE_VIS hash<vector>;
};
template <class _Allocator>
@@ -3275,7 +3275,7 @@ vector<bool, _Allocator>::__hash_code() const _NOEXCEPT
}
template <class _Allocator>
-struct _LIBCPP_TYPE_VIS_ONLY hash<vector<bool, _Allocator> >
+struct _LIBCPP_TEMPLATE_VIS hash<vector<bool, _Allocator> >
: public unary_function<vector<bool, _Allocator>, size_t>
{
_LIBCPP_INLINE_VISIBILITY
diff --git a/src/experimental/memory_resource.cpp b/src/experimental/memory_resource.cpp
index 3e87a2dedded..cc6aab38e058 100644
--- a/src/experimental/memory_resource.cpp
+++ b/src/experimental/memory_resource.cpp
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
// new_delete_resource()
-class _LIBCPP_TYPE_VIS_ONLY __new_delete_memory_resource_imp
+class _LIBCPP_TYPE_VIS __new_delete_memory_resource_imp
: public memory_resource
{
public:
@@ -42,7 +42,7 @@ protected:
// null_memory_resource()
-class _LIBCPP_TYPE_VIS_ONLY __null_memory_resource_imp
+class _LIBCPP_TYPE_VIS __null_memory_resource_imp
: public memory_resource
{
public:
@@ -140,4 +140,4 @@ memory_resource * set_default_resource(memory_resource * __new_res) _NOEXCEPT
return __default_memory_resource(true, __new_res);
}
-_LIBCPP_END_NAMESPACE_LFTS_PMR \ No newline at end of file
+_LIBCPP_END_NAMESPACE_LFTS_PMR
diff --git a/src/include/config_elast.h b/src/include/config_elast.h
index dd736d1a5e3a..97104290d883 100644
--- a/src/include/config_elast.h
+++ b/src/include/config_elast.h
@@ -30,7 +30,7 @@
// No _LIBCPP_ELAST needed on Apple
#elif defined(__sun__)
#define _LIBCPP_ELAST ESTALE
-#elif defined(_LIBCPP_MSCVRT)
+#elif defined(_LIBCPP_MSVCRT)
#define _LIBCPP_ELAST _sys_nerr
#else
// Warn here so that the person doing the libcxx port has an easier time:
diff --git a/src/memory.cpp b/src/memory.cpp
index 514a2ce22667..8569fafb337c 100644
--- a/src/memory.cpp
+++ b/src/memory.cpp
@@ -220,11 +220,12 @@ undeclare_no_pointers(char*, size_t)
{
}
-pointer_safety
-get_pointer_safety() _NOEXCEPT
+#if !defined(_LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE)
+pointer_safety get_pointer_safety() _NOEXCEPT
{
return pointer_safety::relaxed;
}
+#endif
void*
__undeclare_reachable(void* p)
diff --git a/src/mutex.cpp b/src/mutex.cpp
index dc530ceeac0d..9397ae73ca4f 100644
--- a/src/mutex.cpp
+++ b/src/mutex.cpp
@@ -59,7 +59,7 @@ recursive_mutex::recursive_mutex()
recursive_mutex::~recursive_mutex()
{
- int e = __libcpp_mutex_destroy(&__m_);
+ int e = __libcpp_recursive_mutex_destroy(&__m_);
(void)e;
assert(e == 0);
}
@@ -67,7 +67,7 @@ recursive_mutex::~recursive_mutex()
void
recursive_mutex::lock()
{
- int ec = __libcpp_mutex_lock(&__m_);
+ int ec = __libcpp_recursive_mutex_lock(&__m_);
if (ec)
__throw_system_error(ec, "recursive_mutex lock failed");
}
@@ -75,7 +75,7 @@ recursive_mutex::lock()
void
recursive_mutex::unlock() _NOEXCEPT
{
- int e = __libcpp_mutex_unlock(&__m_);
+ int e = __libcpp_recursive_mutex_unlock(&__m_);
(void)e;
assert(e == 0);
}
@@ -83,7 +83,7 @@ recursive_mutex::unlock() _NOEXCEPT
bool
recursive_mutex::try_lock() _NOEXCEPT
{
- return __libcpp_mutex_trylock(&__m_) == 0;
+ return __libcpp_recursive_mutex_trylock(&__m_) == 0;
}
// timed_mutex
diff --git a/test/libcxx/test/config.py b/test/libcxx/test/config.py
index dd90e7a37430..7043b8a01c4a 100644
--- a/test/libcxx/test/config.py
+++ b/test/libcxx/test/config.py
@@ -57,7 +57,9 @@ class Configuration(object):
def __init__(self, lit_config, config):
self.lit_config = lit_config
self.config = config
+ self.is_windows = platform.system() == 'Windows'
self.cxx = None
+ self.cxx_is_clang_cl = None
self.cxx_stdlib_under_test = None
self.project_obj_root = None
self.libcxx_src_root = None
@@ -95,6 +97,13 @@ class Configuration(object):
self.lit_config.fatal(
"parameter '{}' should be true or false".format(name))
+ def make_static_lib_name(self, name):
+ """Return the full filename for the specified library name"""
+ if self.is_windows:
+ return name + '.lib'
+ else:
+ return 'lib' + name + '.a'
+
def configure(self):
self.configure_executor()
self.configure_target_info()
@@ -171,20 +180,25 @@ class Configuration(object):
def configure_cxx(self):
# Gather various compiler parameters.
cxx = self.get_lit_conf('cxx_under_test')
-
+ self.cxx_is_clang_cl = cxx is not None and \
+ os.path.basename(cxx) == 'clang-cl.exe'
# If no specific cxx_under_test was given, attempt to infer it as
# clang++.
- if cxx is None:
+ if cxx is None or self.cxx_is_clang_cl:
clangxx = lit.util.which('clang++',
self.config.environment['PATH'])
if clangxx:
cxx = clangxx
self.lit_config.note(
"inferred cxx_under_test as: %r" % cxx)
+ elif self.cxx_is_clang_cl:
+ self.lit_config.fatal('Failed to find clang++ substitution for'
+ ' clang-cl')
if not cxx:
self.lit_config.fatal('must specify user parameter cxx_under_test '
'(e.g., --param=cxx_under_test=clang++)')
- self.cxx = CXXCompiler(cxx)
+ self.cxx = CXXCompiler(cxx) if not self.cxx_is_clang_cl else \
+ self._configure_clang_cl(cxx)
cxx_type = self.cxx.type
if cxx_type is not None:
assert self.cxx.version is not None
@@ -194,6 +208,25 @@ class Configuration(object):
self.config.available_features.add('%s-%s.%s' % (
cxx_type, maj_v, min_v))
+ def _configure_clang_cl(self, clang_path):
+ assert self.cxx_is_clang_cl
+ # FIXME: don't hardcode the target
+ flags = ['-fms-compatibility-version=19.00',
+ '--target=i686-unknown-windows']
+ compile_flags = []
+ link_flags = ['-fuse-ld=lld']
+ if 'INCLUDE' in os.environ:
+ compile_flags += ['-isystem %s' % p.strip()
+ for p in os.environ['INCLUDE'].split(';')
+ if p.strip()]
+ if 'LIB' in os.environ:
+ link_flags += ['-L%s' % p.strip()
+ for p in os.environ['LIB'].split(';') if p.strip()]
+ return CXXCompiler(clang_path, flags=flags,
+ compile_flags=compile_flags,
+ link_flags=link_flags)
+
+
def configure_src_root(self):
self.libcxx_src_root = self.get_lit_conf(
'libcxx_src_root', os.path.dirname(self.config.test_source_root))
@@ -335,9 +368,13 @@ class Configuration(object):
if self.get_lit_bool('has_libatomic', False):
self.config.available_features.add('libatomic')
- if '__cpp_if_constexpr' not in self.cxx.dumpMacros():
+ macros = self.cxx.dumpMacros()
+ if '__cpp_if_constexpr' not in macros:
self.config.available_features.add('libcpp-no-if-constexpr')
+ if '__cpp_structured_bindings' not in macros:
+ self.config.available_features.add('libcpp-no-structured-bindings')
+
def configure_compile_flags(self):
no_default_flags = self.get_lit_bool('no_default_flags', False)
if not no_default_flags:
@@ -349,6 +386,9 @@ class Configuration(object):
# Configure extra flags
compile_flags_str = self.get_lit_conf('compile_flags', '')
self.cxx.compile_flags += shlex.split(compile_flags_str)
+ # FIXME: Can we remove this?
+ if self.is_windows:
+ self.cxx.compile_flags += ['-D_CRT_SECURE_NO_WARNINGS']
def configure_default_compile_flags(self):
# Try and get the std version from the command line. Fall back to
@@ -396,7 +436,8 @@ class Configuration(object):
def configure_compile_flags_header_includes(self):
support_path = os.path.join(self.libcxx_src_root, 'test/support')
- if self.cxx_stdlib_under_test != 'libstdc++':
+ if self.cxx_stdlib_under_test != 'libstdc++' and \
+ not self.is_windows:
self.cxx.compile_flags += [
'-include', os.path.join(support_path, 'nasty_macros.hpp')]
self.configure_config_site_header()
@@ -412,9 +453,11 @@ class Configuration(object):
self.lit_config.fatal("cxx_headers='%s' is not a directory."
% cxx_headers)
self.cxx.compile_flags += ['-I' + cxx_headers]
- cxxabi_headers = os.path.join(self.libcxx_obj_root, 'include', 'c++-build')
- if os.path.isdir(cxxabi_headers):
- self.cxx.compile_flags += ['-I' + cxxabi_headers]
+ if self.libcxx_obj_root is not None:
+ cxxabi_headers = os.path.join(self.libcxx_obj_root, 'include',
+ 'c++-build')
+ if os.path.isdir(cxxabi_headers):
+ self.cxx.compile_flags += ['-I' + cxxabi_headers]
def configure_config_site_header(self):
# Check for a possible __config_site in the build directory. We
@@ -455,6 +498,8 @@ class Configuration(object):
# Transform each macro name into the feature name used in the tests.
# Ex. _LIBCPP_HAS_NO_THREADS -> libcpp-has-no-threads
for m in feature_macros:
+ if m == '_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS':
+ continue
if m == '_LIBCPP_ABI_VERSION':
self.config.available_features.add('libcpp-abi-version-v%s'
% feature_macros[m])
@@ -530,6 +575,9 @@ class Configuration(object):
# Configure libraries
if self.cxx_stdlib_under_test == 'libc++':
self.cxx.link_flags += ['-nodefaultlibs']
+ # FIXME: Handle MSVCRT as part of the ABI library handling.
+ if self.is_windows:
+ self.cxx.link_flags += ['-nostdlib', '-lmsvcrtd']
self.configure_link_flags_cxx_library()
self.configure_link_flags_abi_library()
self.configure_extra_library_flags()
@@ -554,15 +602,16 @@ class Configuration(object):
if not self.use_system_cxx_lib:
if self.cxx_library_root:
self.cxx.link_flags += ['-L' + self.cxx_library_root]
- if self.cxx_runtime_root:
+ if self.cxx_runtime_root and not self.is_windows:
self.cxx.link_flags += ['-Wl,-rpath,' + self.cxx_runtime_root]
def configure_link_flags_abi_library_path(self):
# Configure ABI library paths.
self.abi_library_root = self.get_lit_conf('abi_library_path')
if self.abi_library_root:
- self.cxx.link_flags += ['-L' + self.abi_library_root,
- '-Wl,-rpath,' + self.abi_library_root]
+ self.cxx.link_flags += ['-L' + self.abi_library_root]
+ if not self.is_windows:
+ self.cxx.link_flags += ['-Wl,-rpath,' + self.abi_library_root]
def configure_link_flags_cxx_library(self):
libcxx_experimental = self.get_lit_bool('enable_experimental', default=False)
@@ -575,7 +624,10 @@ class Configuration(object):
else:
cxx_library_root = self.get_lit_conf('cxx_library_root')
if cxx_library_root:
- abs_path = os.path.join(cxx_library_root, 'libc++.a')
+ libname = self.make_static_lib_name('c++')
+ abs_path = os.path.join(cxx_library_root, libname)
+ assert os.path.exists(abs_path) and \
+ "static libc++ library does not exist"
self.cxx.link_flags += [abs_path]
else:
self.cxx.link_flags += ['-lc++']
@@ -594,7 +646,8 @@ class Configuration(object):
else:
cxxabi_library_root = self.get_lit_conf('abi_library_path')
if cxxabi_library_root:
- abs_path = os.path.join(cxxabi_library_root, 'libc++abi.a')
+ libname = self.make_static_lib_name('c++abi')
+ abs_path = os.path.join(cxxabi_library_root, libname)
self.cxx.link_flags += [abs_path]
else:
self.cxx.link_flags += ['-lc++abi']
diff --git a/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_cxx03.pass.cpp b/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_cxx03.pass.cpp
new file mode 100644
index 000000000000..6d49cea8ba1f
--- /dev/null
+++ b/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_cxx03.pass.cpp
@@ -0,0 +1,46 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// pointer_safety get_pointer_safety();
+
+#include <memory>
+#include <cassert>
+
+#include "test_macros.h"
+
+// libc++ doesn't offer std::pointer_safety in C++03 under the new ABI
+#if TEST_STD_VER < 11 && defined(_LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE)
+#define TEST_IS_UNSUPPORTED
+#endif
+
+#ifndef TEST_IS_UNSUPPORTED
+void test_pr26961() {
+ std::pointer_safety d;
+ d = std::get_pointer_safety();
+ assert(d == std::get_pointer_safety());
+}
+#endif
+
+int main()
+{
+#ifndef TEST_IS_UNSUPPORTED
+ {
+ // Test that std::pointer_safety is still offered in C++03 under the old ABI.
+ std::pointer_safety r = std::get_pointer_safety();
+ assert(r == std::pointer_safety::relaxed ||
+ r == std::pointer_safety::preferred ||
+ r == std::pointer_safety::strict);
+ }
+ {
+ test_pr26961();
+ }
+#endif
+}
diff --git a/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_new_abi.pass.cpp b/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_new_abi.pass.cpp
new file mode 100644
index 000000000000..752edb6dadd9
--- /dev/null
+++ b/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_new_abi.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// pointer_safety get_pointer_safety();
+
+// The pointer_safety interface is no longer provided in C++03 in the new ABI.
+// XFAIL: c++98, c++03
+
+// MODULES_DEFINES: _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE
+#define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE
+#include <memory>
+#include <cassert>
+
+int main()
+{
+ {
+ static_assert(std::is_enum<std::pointer_safety>::value, "");
+ static_assert(!std::is_convertible<std::pointer_safety, int>::value, "");
+ static_assert(std::is_same<
+ std::underlying_type<std::pointer_safety>::type,
+ unsigned char
+ >::value, "");
+ }
+ {
+ std::pointer_safety r = std::get_pointer_safety();
+ assert(r == std::pointer_safety::relaxed ||
+ r == std::pointer_safety::preferred ||
+ r == std::pointer_safety::strict);
+ }
+}
diff --git a/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp b/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
index a94aa2f78299..cb17dfeb071a 100644
--- a/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
+++ b/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp
@@ -10,8 +10,9 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// Clang 3.8 doesn't generate constexpr special members correctly.
-// XFAIL: clang-3.8, apple-clang-7, apple-clang-8
+// The following compilers don't generate constexpr special members correctly.
+// XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8
// <variant>
@@ -63,7 +64,7 @@ struct TCopyAssignNTMoveAssign {
int value;
};
-static_assert(std::is_trivially_copy_assignable_v<TCopyAssignNTMoveAssign>);
+static_assert(std::is_trivially_copy_assignable_v<TCopyAssignNTMoveAssign>, "");
void test_copy_assignment_sfinae() {
{
@@ -99,8 +100,8 @@ void test_copy_assignment_same_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 0);
- static_assert(result.value == 42);
+ static_assert(result.index == 0, "");
+ static_assert(result.value == 42, "");
}
{
struct {
@@ -113,8 +114,8 @@ void test_copy_assignment_same_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value == 42l);
+ static_assert(result.index == 1, "");
+ static_assert(result.value == 42l, "");
}
{
struct {
@@ -127,8 +128,8 @@ void test_copy_assignment_same_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value == 42);
+ static_assert(result.index == 1, "");
+ static_assert(result.value == 42, "");
}
{
struct {
@@ -141,8 +142,8 @@ void test_copy_assignment_same_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value == 42);
+ static_assert(result.index == 1, "");
+ static_assert(result.value == 42, "");
}
}
@@ -158,8 +159,8 @@ void test_copy_assignment_different_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value == 42l);
+ static_assert(result.index == 1, "");
+ static_assert(result.value == 42l, "");
}
{
struct {
@@ -172,8 +173,8 @@ void test_copy_assignment_different_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value == 42);
+ static_assert(result.index == 1, "");
+ static_assert(result.value == 42, "");
}
}
diff --git a/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp b/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp
index a3d92472dd5e..286a623882fe 100644
--- a/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp
+++ b/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp
@@ -10,9 +10,9 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// Clang 3.8 doesn't generate constexpr special members correctly.
-// XFAIL: clang-3.8, apple-clang-7, apple-clang-8
-
+// The following compilers don't generate constexpr special members correctly.
+// XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8
// <variant>
@@ -64,7 +64,7 @@ struct TMoveAssignNTCopyAssign {
int value;
};
-static_assert(std::is_trivially_move_assignable_v<TMoveAssignNTCopyAssign>);
+static_assert(std::is_trivially_move_assignable_v<TMoveAssignNTCopyAssign>, "");
void test_move_assignment_sfinae() {
{
@@ -100,8 +100,8 @@ void test_move_assignment_same_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 0);
- static_assert(result.value == 42);
+ static_assert(result.index == 0, "");
+ static_assert(result.value == 42, "");
}
{
struct {
@@ -114,8 +114,8 @@ void test_move_assignment_same_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value == 42l);
+ static_assert(result.index == 1, "");
+ static_assert(result.value == 42l, "");
}
{
struct {
@@ -128,8 +128,8 @@ void test_move_assignment_same_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value == 42);
+ static_assert(result.index == 1, "");
+ static_assert(result.value == 42, "");
}
}
@@ -145,8 +145,8 @@ void test_move_assignment_different_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value == 42l);
+ static_assert(result.index == 1, "");
+ static_assert(result.value == 42l, "");
}
{
struct {
@@ -159,8 +159,8 @@ void test_move_assignment_different_index() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value == 42);
+ static_assert(result.index == 1, "");
+ static_assert(result.value == 42, "");
}
}
diff --git a/test/libcxx/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp b/test/libcxx/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp
index 59c433050590..0d30a78a48ac 100644
--- a/test/libcxx/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp
+++ b/test/libcxx/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp
@@ -72,45 +72,45 @@ void test_copy_ctor_sfinae() {
void test_copy_ctor_basic() {
{
constexpr std::variant<int> v(std::in_place_index<0>, 42);
- static_assert(v.index() == 0);
+ static_assert(v.index() == 0, "");
constexpr std::variant<int> v2 = v;
- static_assert(v2.index() == 0);
- static_assert(std::get<0>(v2) == 42);
+ static_assert(v2.index() == 0, "");
+ static_assert(std::get<0>(v2) == 42, "");
}
{
constexpr std::variant<int, long> v(std::in_place_index<1>, 42);
- static_assert(v.index() == 1);
+ static_assert(v.index() == 1, "");
constexpr std::variant<int, long> v2 = v;
- static_assert(v2.index() == 1);
- static_assert(std::get<1>(v2) == 42);
+ static_assert(v2.index() == 1, "");
+ static_assert(std::get<1>(v2) == 42, "");
}
{
constexpr std::variant<TCopy> v(std::in_place_index<0>, 42);
- static_assert(v.index() == 0);
+ static_assert(v.index() == 0, "");
constexpr std::variant<TCopy> v2(v);
- static_assert(v2.index() == 0);
- static_assert(std::get<0>(v2).value == 42);
+ static_assert(v2.index() == 0, "");
+ static_assert(std::get<0>(v2).value == 42, "");
}
{
constexpr std::variant<int, TCopy> v(std::in_place_index<1>, 42);
- static_assert(v.index() == 1);
+ static_assert(v.index() == 1, "");
constexpr std::variant<int, TCopy> v2(v);
- static_assert(v2.index() == 1);
- static_assert(std::get<1>(v2).value == 42);
+ static_assert(v2.index() == 1, "");
+ static_assert(std::get<1>(v2).value == 42, "");
}
{
constexpr std::variant<TCopyNTMove> v(std::in_place_index<0>, 42);
- static_assert(v.index() == 0);
+ static_assert(v.index() == 0, "");
constexpr std::variant<TCopyNTMove> v2(v);
- static_assert(v2.index() == 0);
- static_assert(std::get<0>(v2).value == 42);
+ static_assert(v2.index() == 0, "");
+ static_assert(std::get<0>(v2).value == 42, "");
}
{
constexpr std::variant<int, TCopyNTMove> v(std::in_place_index<1>, 42);
- static_assert(v.index() == 1);
+ static_assert(v.index() == 1, "");
constexpr std::variant<int, TCopyNTMove> v2(v);
- static_assert(v2.index() == 1);
- static_assert(std::get<1>(v2).value == 42);
+ static_assert(v2.index() == 1, "");
+ static_assert(std::get<1>(v2).value == 42, "");
}
}
diff --git a/test/libcxx/utilities/variant/variant.variant/variant.ctor/move.pass.cpp b/test/libcxx/utilities/variant/variant.variant/variant.ctor/move.pass.cpp
index e67a495d9799..91e8c194d144 100644
--- a/test/libcxx/utilities/variant/variant.variant/variant.ctor/move.pass.cpp
+++ b/test/libcxx/utilities/variant/variant.variant/variant.ctor/move.pass.cpp
@@ -82,8 +82,8 @@ void test_move_ctor_basic() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 0);
- static_assert(result.value == 42);
+ static_assert(result.index == 0, "");
+ static_assert(result.value == 42, "");
}
{
struct {
@@ -94,8 +94,8 @@ void test_move_ctor_basic() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value == 42);
+ static_assert(result.index == 1, "");
+ static_assert(result.value == 42, "");
}
{
struct {
@@ -106,8 +106,8 @@ void test_move_ctor_basic() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 0);
- static_assert(result.value.value == 42);
+ static_assert(result.index == 0, "");
+ static_assert(result.value.value == 42, "");
}
{
struct {
@@ -118,8 +118,8 @@ void test_move_ctor_basic() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value.value == 42);
+ static_assert(result.index == 1, "");
+ static_assert(result.value.value == 42, "");
}
{
struct {
@@ -130,8 +130,8 @@ void test_move_ctor_basic() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 0);
- static_assert(result.value.value == 42);
+ static_assert(result.index == 0, "");
+ static_assert(result.value.value == 42, "");
}
{
struct {
@@ -142,8 +142,8 @@ void test_move_ctor_basic() {
}
} test;
constexpr auto result = test();
- static_assert(result.index == 1);
- static_assert(result.value.value == 42);
+ static_assert(result.index == 1, "");
+ static_assert(result.value.value == 42, "");
}
}
diff --git a/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp b/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp
index 1f27b45e8ab8..df77be9643db 100644
--- a/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp
+++ b/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp
@@ -11,13 +11,27 @@
// pointer_safety get_pointer_safety();
+// UNSUPPORTED: c++98, c++03
+
#include <memory>
#include <cassert>
+
+void test_pr26961() {
+ std::pointer_safety d;
+ d = std::get_pointer_safety();
+ assert(d == std::get_pointer_safety());
+}
+
int main()
{
+ {
std::pointer_safety r = std::get_pointer_safety();
assert(r == std::pointer_safety::relaxed ||
r == std::pointer_safety::preferred ||
r == std::pointer_safety::strict);
+ }
+ {
+ test_pr26961();
+ }
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++.pass.cpp
index 8a8f4b1c0d9b..702c38d2d4a9 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++.pass.cpp
@@ -11,15 +11,31 @@
// duration
-// duration& operator++();
+// constexpr duration& operator++(); // constexpr in c++17
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER > 14
+constexpr bool test_constexpr()
+{
+ std::chrono::hours h(3);
+ return (++h).count() == 4;
+}
+#endif
+
int main()
{
+ {
std::chrono::hours h(3);
std::chrono::hours& href = ++h;
assert(&href == &h);
assert(h.count() == 4);
+ }
+
+#if TEST_STD_VER > 14
+ static_assert(test_constexpr(), "");
+#endif
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++int.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++int.pass.cpp
index cf5028281007..49b8c76ee8ee 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++int.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++int.pass.cpp
@@ -11,15 +11,32 @@
// duration
-// duration operator++(int);
+// constexpr duration operator++(int); // constexpr in c++17
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER > 14
+constexpr bool test_constexpr()
+{
+ std::chrono::hours h1(3);
+ std::chrono::hours h2 = h1++;
+ return h1.count() == 4 && h2.count() == 3;
+}
+#endif
+
int main()
{
- std::chrono::hours h(3);
- std::chrono::hours h2 = h++;
- assert(h.count() == 4);
+ {
+ std::chrono::hours h1(3);
+ std::chrono::hours h2 = h1++;
+ assert(h1.count() == 4);
assert(h2.count() == 3);
+ }
+
+#if TEST_STD_VER > 14
+ static_assert(test_constexpr(), "");
+#endif
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+=.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+=.pass.cpp
index 8d8cf4539c16..bec8effbe220 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+=.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+=.pass.cpp
@@ -11,16 +11,35 @@
// duration
-// duration& operator+=(const duration& d);
+// constexpr duration& operator+=(const duration& d); // constexpr in c++17
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER > 14
+constexpr bool test_constexpr()
+{
+ std::chrono::seconds s(3);
+ s += std::chrono::seconds(2);
+ if (s.count() != 5) return false;
+ s += std::chrono::minutes(2);
+ return s.count() == 125;
+}
+#endif
+
int main()
{
+ {
std::chrono::seconds s(3);
s += std::chrono::seconds(2);
assert(s.count() == 5);
s += std::chrono::minutes(2);
assert(s.count() == 125);
+ }
+
+#if TEST_STD_VER > 14
+ static_assert(test_constexpr(), "");
+#endif
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--.pass.cpp
index 0aadfbcd5991..98b22a7b18bd 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--.pass.cpp
@@ -11,15 +11,31 @@
// duration
-// duration& operator--();
+// constexpr duration& operator--(); // constexpr in C++17
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER > 14
+constexpr bool test_constexpr()
+{
+ std::chrono::hours h(3);
+ return (--h).count() == 2;
+}
+#endif
+
int main()
{
+ {
std::chrono::hours h(3);
std::chrono::hours& href = --h;
assert(&href == &h);
assert(h.count() == 2);
+ }
+
+#if TEST_STD_VER > 14
+ static_assert(test_constexpr(), "");
+#endif
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--int.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--int.pass.cpp
index 7fc6a1df603f..a908c44dda85 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--int.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_--int.pass.cpp
@@ -11,15 +11,33 @@
// duration
-// duration operator--(int);
+// constexpr duration operator--(int); // constexpr in C++17
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER > 14
+constexpr bool test_constexpr()
+{
+ std::chrono::hours h1(3);
+ std::chrono::hours h2 = h1--;
+ return h1.count() == 2 && h2.count() == 3;
+}
+#endif
+
+
int main()
{
- std::chrono::hours h(3);
- std::chrono::hours h2 = h--;
- assert(h.count() == 2);
+ {
+ std::chrono::hours h1(3);
+ std::chrono::hours h2 = h1--;
+ assert(h1.count() == 2);
assert(h2.count() == 3);
+ }
+
+#if TEST_STD_VER > 14
+ static_assert(test_constexpr(), "");
+#endif
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-=.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-=.pass.cpp
index a0a7aed202b1..185db177882e 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-=.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_-=.pass.cpp
@@ -16,11 +16,30 @@
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER > 14
+constexpr bool test_constexpr()
+{
+ std::chrono::seconds s(3);
+ s -= std::chrono::seconds(2);
+ if (s.count() != 1) return false;
+ s -= std::chrono::minutes(2);
+ return s.count() == -119;
+}
+#endif
+
int main()
{
+ {
std::chrono::seconds s(3);
s -= std::chrono::seconds(2);
assert(s.count() == 1);
s -= std::chrono::minutes(2);
assert(s.count() == -119);
+ }
+
+#if TEST_STD_VER > 14
+ static_assert(test_constexpr(), "");
+#endif
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_divide=.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_divide=.pass.cpp
index 09786bcd8cf8..4ae774b6c1f1 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_divide=.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_divide=.pass.cpp
@@ -16,9 +16,26 @@
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER > 14
+constexpr bool test_constexpr()
+{
+ std::chrono::seconds s(15);
+ s /= 5;
+ return s.count() == 3;
+}
+#endif
+
int main()
{
+ {
std::chrono::nanoseconds ns(15);
ns /= 5;
assert(ns.count() == 3);
+ }
+
+#if TEST_STD_VER > 14
+ static_assert(test_constexpr(), "");
+#endif
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp
index 8a4a2b472324..624468671244 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp
@@ -16,12 +16,30 @@
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER > 14
+constexpr bool test_constexpr()
+{
+ std::chrono::microseconds us1(11);
+ std::chrono::microseconds us2(3);
+ us1 %= us2;
+ return us1.count() == 2;
+}
+#endif
+
int main()
{
- std::chrono::microseconds us(11);
+ {
+ std::chrono::microseconds us1(11);
std::chrono::microseconds us2(3);
- us %= us2;
- assert(us.count() == 2);
- us %= std::chrono::milliseconds(3);
- assert(us.count() == 2);
+ us1 %= us2;
+ assert(us1.count() == 2);
+ us1 %= std::chrono::milliseconds(3);
+ assert(us1.count() == 2);
+ }
+
+#if TEST_STD_VER > 14
+ static_assert(test_constexpr(), "");
+#endif
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp
index 8758e17ba6af..a4852d261f7e 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp
@@ -16,9 +16,26 @@
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER > 14
+constexpr bool test_constexpr()
+{
+ std::chrono::seconds s(11);
+ s %= 3;
+ return s.count() == 2;
+}
+#endif
+
int main()
{
+ {
std::chrono::microseconds us(11);
us %= 3;
assert(us.count() == 2);
+ }
+
+#if TEST_STD_VER > 14
+ static_assert(test_constexpr(), "");
+#endif
}
diff --git a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp
index b97534a3615a..0f76788c00ef 100644
--- a/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp
+++ b/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp
@@ -16,9 +16,26 @@
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
+#if TEST_STD_VER > 14
+constexpr bool test_constexpr()
+{
+ std::chrono::seconds s(3);
+ s *= 5;
+ return s.count() == 15;
+}
+#endif
+
int main()
{
+ {
std::chrono::nanoseconds ns(3);
ns *= 5;
assert(ns.count() == 15);
+ }
+
+#if TEST_STD_VER > 14
+ static_assert(test_constexpr(), "");
+#endif
}
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp
index 3e4145c79cb5..49b4215a1956 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp
@@ -20,13 +20,6 @@
#include <tuple>
#include <type_traits>
-template <class T, class = decltype(std::tuple_size<T>::value)>
-constexpr bool has_value(int) { return true; }
-template <class> constexpr bool has_value(long) { return false; }
-template <class T> constexpr bool has_value() { return has_value<T>(0); }
-
-struct Dummy {};
-
template <class T, std::size_t N>
void test()
{
@@ -40,21 +33,10 @@ void test()
std::tuple_size<const volatile T> >::value), "");
}
-void test_tuple_size_value_sfinae() {
- // Test that the ::value member does not exist
- static_assert(has_value<std::tuple<int> const>(), "");
- static_assert(has_value<std::pair<int, long> volatile>(), "");
- static_assert(!has_value<int>(), "");
- static_assert(!has_value<const int>(), "");
- static_assert(!has_value<volatile void>(), "");
- static_assert(!has_value<const volatile std::tuple<int>&>(), "");
-}
-
int main()
{
test<std::tuple<>, 0>();
test<std::tuple<int>, 1>();
test<std::tuple<char, int>, 2>();
test<std::tuple<char, char*, int>, 3>();
- test_tuple_size_value_sfinae();
}
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp
new file mode 100644
index 000000000000..818001833995
--- /dev/null
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp
@@ -0,0 +1,63 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <tuple>
+
+// template <class... Types> class tuple;
+
+// template <class... Types>
+// class tuple_size<tuple<Types...>>
+// : public integral_constant<size_t, sizeof...(Types)> { };
+
+// UNSUPPORTED: c++98, c++03
+
+#include <tuple>
+#include <array>
+#include <type_traits>
+
+struct Dummy1 {};
+struct Dummy2 {};
+struct Dummy3 {};
+
+template <>
+class std::tuple_size<Dummy1> {
+public:
+ static size_t value;
+};
+
+template <>
+class std::tuple_size<Dummy2> {
+public:
+ static void value() {}
+};
+
+template <>
+class std::tuple_size<Dummy3> {};
+
+int main()
+{
+ // Test that tuple_size<const T> is not incomplete when tuple_size<T>::value
+ // is well-formed but not a constant expression.
+ {
+ // expected-error@__tuple:* 1 {{is not a constant expression}}
+ (void)std::tuple_size<const Dummy1>::value; // expected-note {{here}}
+ }
+ // Test that tuple_size<const T> is not incomplete when tuple_size<T>::value
+ // is well-formed but not convertible to size_t.
+ {
+ // expected-error@__tuple:* 1 {{value of type 'void ()' is not implicitly convertible to}}
+ (void)std::tuple_size<const Dummy2>::value; // expected-note {{here}}
+ }
+ // Test that tuple_size<const T> generates an error when tuple_size<T> is
+ // complete but ::value isn't a constant expression convertible to size_t.
+ {
+ // expected-error@__tuple:* 1 {{no member named 'value'}}
+ (void)std::tuple_size<const Dummy3>::value; // expected-note {{here}}
+ }
+}
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp
new file mode 100644
index 000000000000..ccdd48e4c11d
--- /dev/null
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp
@@ -0,0 +1,67 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <tuple>
+
+// template <class... Types> class tuple;
+
+// template <class... Types>
+// class tuple_size<tuple<Types...>>
+// : public integral_constant<size_t, sizeof...(Types)> { };
+
+// XFAIL: gcc-4.9
+// UNSUPPORTED: c++98, c++03
+
+#include <tuple>
+#include <array>
+#include <type_traits>
+
+template <class T, size_t Size = sizeof(std::tuple_size<T>)>
+constexpr bool is_complete(int) { static_assert(Size > 0, ""); return true; }
+template <class> constexpr bool is_complete(long) { return false; }
+template <class T> constexpr bool is_complete() { return is_complete<T>(0); }
+
+struct Dummy1 {};
+struct Dummy2 {};
+
+namespace std {
+template <> class tuple_size<Dummy1> : public integral_constant<size_t, 0> {};
+}
+
+template <class T>
+void test_complete() {
+ static_assert(is_complete<T>(), "");
+ static_assert(is_complete<const T>(), "");
+ static_assert(is_complete<volatile T>(), "");
+ static_assert(is_complete<const volatile T>(), "");
+}
+
+template <class T>
+void test_incomplete() {
+ static_assert(!is_complete<T>(), "");
+ static_assert(!is_complete<const T>(), "");
+ static_assert(!is_complete<volatile T>(), "");
+ static_assert(!is_complete<const volatile T>(), "");
+}
+
+
+int main()
+{
+ test_complete<std::tuple<> >();
+ test_complete<std::tuple<int&> >();
+ test_complete<std::tuple<int&&, int&, void*>>();
+ test_complete<std::pair<int, long> >();
+ test_complete<std::array<int, 5> >();
+ test_complete<Dummy1>();
+
+ test_incomplete<void>();
+ test_incomplete<int>();
+ test_incomplete<std::tuple<int>&>();
+ test_incomplete<Dummy2>();
+}
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
new file mode 100644
index 000000000000..aadbf3d5a369
--- /dev/null
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
@@ -0,0 +1,138 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <tuple>
+
+// template <class... Types> class tuple;
+
+// template <class... Types>
+// class tuple_size<tuple<Types...>>
+// : public integral_constant<size_t, sizeof...(Types)> { };
+
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// UNSUPPORTED: libcpp-no-structured-bindings
+
+#include <tuple>
+#include <array>
+#include <type_traits>
+#include <cassert>
+
+struct S { int x; };
+
+void test_decomp_user_type() {
+ {
+ S s{99};
+ auto [m1] = s;
+ auto& [r1] = s;
+ assert(m1 == 99);
+ assert(&r1 == &s.x);
+ }
+ {
+ S const s{99};
+ auto [m1] = s;
+ auto& [r1] = s;
+ assert(m1 == 99);
+ assert(&r1 == &s.x);
+ }
+}
+
+void test_decomp_tuple() {
+ typedef std::tuple<int> T;
+ {
+ T s{99};
+ auto [m1] = s;
+ auto& [r1] = s;
+ assert(m1 == 99);
+ assert(&r1 == &std::get<0>(s));
+ }
+ {
+ T const s{99};
+ auto [m1] = s;
+ auto& [r1] = s;
+ assert(m1 == 99);
+ assert(&r1 == &std::get<0>(s));
+ }
+}
+
+
+void test_decomp_pair() {
+ typedef std::pair<int, double> T;
+ {
+ T s{99, 42.1};
+ auto [m1, m2] = s;
+ auto& [r1, r2] = s;
+ assert(m1 == 99);
+ assert(&r1 == &std::get<0>(s));
+ }
+ {
+ T const s{99, 42.1};
+ auto [m1, m2] = s;
+ auto& [r1, r2] = s;
+ assert(m1 == 99);
+ assert(&r1 == &std::get<0>(s));
+ }
+}
+
+void test_decomp_array() {
+ typedef std::array<int, 3> T;
+ {
+ T s{{99, 42, -1}};
+ auto [m1, m2, m3] = s;
+ auto& [r1, r2, r3] = s;
+ assert(m1 == 99);
+ assert(&r1 == &std::get<0>(s));
+ }
+ {
+ T const s{{99, 42, -1}};
+ auto [m1, m2, m3] = s;
+ auto& [r1, r2, r3] = s;
+ assert(m1 == 99);
+ assert(&r1 == &std::get<0>(s));
+ }
+}
+
+struct Test {
+ int x;
+};
+
+template <size_t N>
+int get(Test const&) { static_assert(N == 0, ""); return -1; }
+
+template <>
+class std::tuple_element<0, Test> {
+public:
+ typedef int type;
+};
+
+void test_before_tuple_size_specialization() {
+ Test const t{99};
+ auto& [p] = t;
+ assert(p == 99);
+}
+
+template <>
+class std::tuple_size<Test> {
+public:
+ static const size_t value = 1;
+};
+
+void test_after_tuple_size_specialization() {
+ Test const t{99};
+ auto& [p] = t;
+ assert(p == -1);
+}
+
+int main() {
+ test_decomp_user_type();
+ test_decomp_tuple();
+ test_decomp_pair();
+ test_decomp_array();
+ test_before_tuple_size_specialization();
+ test_after_tuple_size_specialization();
+}
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp
new file mode 100644
index 000000000000..31ebe5878379
--- /dev/null
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <tuple>
+
+// template <class... Types> class tuple;
+
+// template <class... Types>
+// class tuple_size<tuple<Types...>>
+// : public integral_constant<size_t, sizeof...(Types)> { };
+
+// XFAIL: gcc-4.9
+// UNSUPPORTED: c++98, c++03
+
+#include <tuple>
+#include <type_traits>
+
+template <class T, class = decltype(std::tuple_size<T>::value)>
+constexpr bool has_value(int) { return true; }
+template <class> constexpr bool has_value(long) { return false; }
+template <class T> constexpr bool has_value() { return has_value<T>(0); }
+
+struct Dummy {};
+
+int main() {
+ // Test that the ::value member does not exist
+ static_assert(has_value<std::tuple<int> const>(), "");
+ static_assert(has_value<std::pair<int, long> volatile>(), "");
+ static_assert(!has_value<int>(), "");
+ static_assert(!has_value<const int>(), "");
+ static_assert(!has_value<volatile void>(), "");
+ static_assert(!has_value<const volatile std::tuple<int>&>(), "");
+}
diff --git a/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp b/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
index 4b30188ce6ff..6675b5f2b2ba 100644
--- a/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
@@ -10,8 +10,10 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// Clang 3.8 doesn't allow constexpr variables of non-literal type
-// XFAIL: clang-3.8, apple-clang-7, apple-clang-8
+// The following compilers don't allow constexpr variables of non-literal type.
+// XFAIL: gcc-5, gcc-6
+// XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8
// <variant>
diff --git a/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp b/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp
index 8546beb1319c..a0c57e132403 100644
--- a/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp
@@ -10,8 +10,10 @@
// UNSUPPORTED: c++98, c++03, c++11, c++14
-// Clang 3.8 doesn't allow constexpr variables of non-literal type
-// XFAIL: clang-3.8, apple-clang-7, apple-clang-8
+// The following compilers don't allow constexpr variables of non-literal type.
+// XFAIL: gcc-5, gcc-6
+// XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8
+// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8
// <variant>
diff --git a/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp b/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp
index 416c6b4e334d..48cda222083f 100644
--- a/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp
@@ -489,7 +489,7 @@ void test_swap_sfinae() {
// but is still swappable via the generic swap algorithm, since the
// variant is move constructible and move assignable.
using V = std::variant<int, NotSwappable>;
- LIBCPP_STATIC_ASSERT(!has_swap_member<V>());
+ LIBCPP_STATIC_ASSERT(!has_swap_member<V>(), "");
static_assert(std::is_swappable_v<V>, "");
}
{
@@ -569,7 +569,7 @@ void test_swap_noexcept() {
// but is still swappable via the generic swap algorithm, since the
// variant is move constructible and move assignable.
using V = std::variant<int, NotSwappable>;
- LIBCPP_STATIC_ASSERT(!has_swap_member<V>());
+ LIBCPP_STATIC_ASSERT(!has_swap_member<V>(), "");
static_assert(std::is_swappable_v<V>, "");
static_assert(std::is_nothrow_swappable_v<V>, "");
V v1, v2;
diff --git a/www/cxx1z_status.html b/www/cxx1z_status.html
index e90f4b4dff58..7c15fdfc4ce3 100644
--- a/www/cxx1z_status.html
+++ b/www/cxx1z_status.html
@@ -132,7 +132,7 @@
<tr><td><a href="http://wg21.link/P0502R0">P0502R0</a></td><td>LWG</td><td>Throwing out of a parallel algorithm terminates - but how?</td><td>Issaquah</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/P0503R0">P0503R0</a></td><td>LWG</td><td>Correcting library usage of "literal type"</td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>
<tr><td><a href="http://wg21.link/P0504R0">P0504R0</a></td><td>LWG</td><td>Revisiting in-place tag types for any/optional/variant</td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>
- <tr><td><a href="http://wg21.link/P0505R0">P0505R0</a></td><td>LWG</td><td>Wording for GB 50 - constexpr for chrono</td><td>Issaquah</td><td></td><td></td></tr>
+ <tr><td><a href="http://wg21.link/P0505R0">P0505R0</a></td><td>LWG</td><td>Wording for GB 50 - constexpr for chrono</td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>
<tr><td><a href="http://wg21.link/P0508R0">P0508R0</a></td><td>LWG</td><td>Wording for GB 58 - structured bindings for node_handles</td><td>Issaquah</td><td></td><td></td></tr>
<tr><td><a href="http://wg21.link/P0509R1">P0509R1</a></td><td>LWG</td><td>Updating “Restrictions on exception handling”</td><td>Issaquah</td><td><i>Nothing to do</i></td><td>n/a</td></tr>
<tr><td><a href="http://wg21.link/P0510R0">P0510R0</a></td><td>LWG</td><td>Disallowing references, incomplete types, arrays, and empty variants</td><td>Issaquah</td><td>Complete</td><td>4.0</td></tr>