Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions external/include/libcxx/any
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public:
, class _Tp = decay_t<_ValueType>
, class = enable_if_t<
!is_same<_Tp, any>::value &&
!__is_inplace_type_tag<_ValueType>::value &&
!__is_inplace_type<_ValueType>::value &&
is_copy_constructible<_Tp>::value>
>
_LIBCPP_INLINE_VISIBILITY
Expand Down Expand Up @@ -578,13 +578,13 @@ void swap(any & __lhs, any & __rhs) _NOEXCEPT
template <class _Tp, class ..._Args>
inline _LIBCPP_INLINE_VISIBILITY
any make_any(_Args&&... __args) {
return any(in_place<_Tp>, _VSTD::forward<_Args>(__args)...);
return any(in_place_type<_Tp>, _VSTD::forward<_Args>(__args)...);
}

template <class _Tp, class _Up, class ..._Args>
inline _LIBCPP_INLINE_VISIBILITY
any make_any(initializer_list<_Up> __il, _Args&&... __args) {
return any(in_place<_Tp>, __il, _VSTD::forward<_Args>(__args)...);
return any(in_place_type<_Tp>, __il, _VSTD::forward<_Args>(__args)...);
}

template <class _ValueType>
Expand Down
42 changes: 36 additions & 6 deletions external/include/libcxx/utility
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ template <size_t I>
in_place_tag in_place(unspecified <I>);

} // std

*/

#include <__config>
Expand Down Expand Up @@ -905,7 +904,7 @@ _T1 exchange(_T1& __obj, _T2 && __new_value)
#endif // _LIBCPP_STD_VER > 11

#if _LIBCPP_STD_VER > 14

/*
struct _LIBCPP_TYPE_VIS_ONLY __in_place_tag {};
template <class> struct _LIBCPP_TYPE_VIS_ONLY __in_place_type_tag {};
template <size_t> struct _LIBCPP_TYPE_VIS_ONLY __in_place_index_tag {};
Expand All @@ -928,13 +927,22 @@ private:
friend inline in_place_tag in_place(__in_place_type_tag<_Tp>);
template <size_t _Nx>
friend inline in_place_tag in_place(__in_place_index_tag<_Nx>);
*/
struct _LIBCPP_TYPE_VIS in_place_t {
explicit in_place_t() = default;
};

/*#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES
inline
#endif*/
constexpr in_place_t in_place{};
/*
inline in_place_tag in_place(__in_place_tag __t) {
_LIBCPP_ASSERT(false, "The in_place function cannot be invoked");
return in_place_tag(__t);
}
*/
template <class _Tp>
/*
inline in_place_tag in_place(__in_place_type_tag<_Tp>) {
_LIBCPP_ASSERT(false, "The in_place function cannot be invoked");
return in_place_tag(__in_place_tag{});
Expand All @@ -949,15 +957,37 @@ template <class _Tp> struct __is_inplace_tag_imp : false_type {};
template <> struct __is_inplace_tag_imp<in_place_tag(__in_place_tag)> : true_type {};
template <class _Tp> struct __is_inplace_tag_imp<in_place_tag(__in_place_type_tag<_Tp>)> : true_type {};
template <size_t _Idx> struct __is_inplace_tag_imp<in_place_tag(__in_place_index_tag<_Idx>)> : true_type {};
*/
struct _LIBCPP_TYPE_VIS in_place_type_t {
explicit in_place_type_t() = default;
};

template <class _Tp>
using __is_inplace_tag = __is_inplace_tag_imp<remove_pointer_t<decay_t<_Tp>>>;

//using __is_inplace_tag = __is_inplace_tag_imp<remove_pointer_t<decay_t<_Tp>>>;
/*#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES
inline
#endif*/
constexpr in_place_type_t<_Tp> in_place_type{};

template <size_t _Idx>
struct _LIBCPP_TYPE_VIS in_place_index_t {
explicit in_place_index_t() = default;
};
template <size_t _Idx>
/*#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES
inline
#endif*/
constexpr in_place_index_t<_Idx> in_place_index{};
/*
template <class _Tp> struct __is_inplace_type_tag_imp : false_type {};
template <class _Tp> struct __is_inplace_type_tag_imp<in_place_tag(__in_place_type_tag<_Tp>)> : true_type {};
*/
template <class _Tp> struct __is_inplace_type_imp : false_type {};
template <class _Tp> struct __is_inplace_type_imp<in_place_type_t<_Tp>> : true_type {};

template <class _Tp>
using __is_inplace_type_tag = __is_inplace_type_tag_imp<remove_pointer_t<decay_t<_Tp>>>;
//using __is_inplace_type_tag = __is_inplace_type_tag_imp<remove_pointer_t<decay_t<_Tp>>>;
using __is_inplace_type = __is_inplace_type_imp<__uncvref_t<_Tp>>;


#endif // _LIBCPP_STD_VER > 14
Expand Down
Loading