[NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS
The name _LIBCPP_TYPE_VIS_ONLY is no longer accurate because both _LIBCPP_TYPE_VIS and _LIBCPP_TYPE_VIS_ONLY expand to __attribute__((__type_visibility__)) with Clang. The only remaining difference is that _LIBCPP_TYPE_VIS_ONLY can be applied to templates whereas _LIBCPP_TYPE_VIS cannot (due to dllimport/dllexport not being allowed on templates). This patch renames _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291035 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -22,56 +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;
|
||||
|
||||
#if !defined(_LIBCPP_CXX03_LANG)
|
||||
template <class _Tp, class...>
|
||||
using __enable_if_tuple_size_imp = _Tp;
|
||||
|
||||
template <class _Tp>
|
||||
class _LIBCPP_TYPE_VIS_ONLY tuple_size<__enable_if_tuple_size_imp<
|
||||
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<__enable_if_tuple_size_imp<
|
||||
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<__enable_if_tuple_size_imp<
|
||||
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> {};
|
||||
|
||||
#else
|
||||
template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_size<const _Tp> : public tuple_size<_Tp> {};
|
||||
template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_size<volatile _Tp> : public tuple_size<_Tp> {};
|
||||
template <class _Tp> class _LIBCPP_TYPE_VIS_ONLY tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
|
||||
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;
|
||||
@@ -160,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)>
|
||||
{
|
||||
};
|
||||
@@ -219,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 {};
|
||||
|
||||
@@ -282,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");
|
||||
@@ -291,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)>
|
||||
{
|
||||
};
|
||||
@@ -457,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;
|
||||
|
||||
Reference in New Issue
Block a user