forked from OSchip/llvm-project
parent
16166a4d71
commit
fd83822741
|
@ -1428,7 +1428,7 @@ private:
|
||||||
__node_alloc() = __t.__node_alloc();
|
__node_alloc() = __t.__node_alloc();
|
||||||
}
|
}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __copy_assign_alloc(const __tree& __t, false_type) {}
|
void __copy_assign_alloc(const __tree&, false_type) {}
|
||||||
|
|
||||||
void __move_assign(__tree& __t, false_type);
|
void __move_assign(__tree& __t, false_type);
|
||||||
void __move_assign(__tree& __t, true_type)
|
void __move_assign(__tree& __t, true_type)
|
||||||
|
@ -1448,7 +1448,7 @@ private:
|
||||||
_NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value)
|
_NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value)
|
||||||
{__node_alloc() = _VSTD::move(__t.__node_alloc());}
|
{__node_alloc() = _VSTD::move(__t.__node_alloc());}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __move_assign_alloc(__tree& __t, false_type) _NOEXCEPT {}
|
void __move_assign_alloc(__tree&, false_type) _NOEXCEPT {}
|
||||||
|
|
||||||
__node_pointer __detach();
|
__node_pointer __detach();
|
||||||
static __node_pointer __detach(__node_pointer);
|
static __node_pointer __detach(__node_pointer);
|
||||||
|
|
|
@ -1754,7 +1754,9 @@ _BidirectionalIterator2
|
||||||
copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
|
copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
|
||||||
_BidirectionalIterator2 __result)
|
_BidirectionalIterator2 __result)
|
||||||
{
|
{
|
||||||
return _VSTD::__copy_backward(__unwrap_iter(__first), __unwrap_iter(__last), __unwrap_iter(__result));
|
return _VSTD::__copy_backward(__unwrap_iter(__first),
|
||||||
|
__unwrap_iter(__last),
|
||||||
|
__unwrap_iter(__result));
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy_if
|
// copy_if
|
||||||
|
@ -4895,7 +4897,8 @@ push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
|
||||||
|
|
||||||
template <class _Compare, class _RandomAccessIterator>
|
template <class _Compare, class _RandomAccessIterator>
|
||||||
void
|
void
|
||||||
__sift_down(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
|
__sift_down(_RandomAccessIterator __first, _RandomAccessIterator /*__last*/,
|
||||||
|
_Compare __comp,
|
||||||
typename iterator_traits<_RandomAccessIterator>::difference_type __len,
|
typename iterator_traits<_RandomAccessIterator>::difference_type __len,
|
||||||
_RandomAccessIterator __start)
|
_RandomAccessIterator __start)
|
||||||
{
|
{
|
||||||
|
|
|
@ -844,7 +844,7 @@ imag(const complex<_Tp>& __c)
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
typename __libcpp_complex_overload_traits<_Tp>::_ValueType
|
typename __libcpp_complex_overload_traits<_Tp>::_ValueType
|
||||||
imag(_Tp __re)
|
imag(_Tp)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,7 @@ make_exception_ptr(_Ep __e) _NOEXCEPT
|
||||||
return current_exception();
|
return current_exception();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)__e);
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -208,6 +209,9 @@ throw_with_nested (_Tp& __t, typename enable_if<
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw __nested<typename remove_reference<_Tp>::type>(_VSTD::forward<_Tp>(__t));
|
throw __nested<typename remove_reference<_Tp>::type>(_VSTD::forward<_Tp>(__t));
|
||||||
|
#else
|
||||||
|
((void)__t);
|
||||||
|
// FIXME: Make this abort.
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,6 +232,9 @@ throw_with_nested (_Tp& __t, typename enable_if<
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw _VSTD::forward<_Tp>(__t);
|
throw _VSTD::forward<_Tp>(__t);
|
||||||
|
#else
|
||||||
|
((void)__t);
|
||||||
|
// FIXME: Make this abort
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1218,14 +1218,18 @@ private:
|
||||||
|
|
||||||
template <class... _Args>
|
template <class... _Args>
|
||||||
_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE
|
_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE
|
||||||
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
void __throw_filesystem_error(_Args && ...__args)
|
void __throw_filesystem_error(_Args && ...__args)
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
|
||||||
throw filesystem_error(std::forward<_Args>(__args)...);
|
throw filesystem_error(std::forward<_Args>(__args)...);
|
||||||
#else
|
|
||||||
_VSTD::abort();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
void __throw_filesystem_error(_Args&&...)
|
||||||
|
{
|
||||||
|
_VSTD::abort();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// operational functions
|
// operational functions
|
||||||
|
|
||||||
|
|
|
@ -721,7 +721,7 @@ template <class _Tp>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
constexpr
|
constexpr
|
||||||
bool
|
bool
|
||||||
operator<=(nullopt_t, const optional<_Tp>& __x) noexcept
|
operator<=(nullopt_t, const optional<_Tp>&) noexcept
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -739,7 +739,7 @@ template <class _Tp>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
constexpr
|
constexpr
|
||||||
bool
|
bool
|
||||||
operator>(nullopt_t, const optional<_Tp>& __x) noexcept
|
operator>(nullopt_t, const optional<_Tp>&) noexcept
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -531,7 +531,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __move_assign_alloc(__forward_list_base& __x, false_type) _NOEXCEPT
|
void __move_assign_alloc(__forward_list_base&, false_type) _NOEXCEPT
|
||||||
{}
|
{}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __move_assign_alloc(__forward_list_base& __x, true_type)
|
void __move_assign_alloc(__forward_list_base& __x, true_type)
|
||||||
|
@ -1426,7 +1426,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||||
template <class _Tp, class _Alloc>
|
template <class _Tp, class _Alloc>
|
||||||
void
|
void
|
||||||
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||||
forward_list& __x,
|
forward_list& /*__other*/,
|
||||||
const_iterator __i)
|
const_iterator __i)
|
||||||
{
|
{
|
||||||
const_iterator __lm1 = _VSTD::next(__i);
|
const_iterator __lm1 = _VSTD::next(__i);
|
||||||
|
@ -1441,7 +1441,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||||
template <class _Tp, class _Alloc>
|
template <class _Tp, class _Alloc>
|
||||||
void
|
void
|
||||||
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||||
forward_list& __x,
|
forward_list& /*__other*/,
|
||||||
const_iterator __f, const_iterator __l)
|
const_iterator __f, const_iterator __l)
|
||||||
{
|
{
|
||||||
if (__f != __l && __p != __f)
|
if (__f != __l && __p != __f)
|
||||||
|
|
|
@ -1751,13 +1751,13 @@ template <class _Cont>
|
||||||
constexpr auto size(const _Cont& __c) -> decltype(__c.size()) { return __c.size(); }
|
constexpr auto size(const _Cont& __c) -> decltype(__c.size()) { return __c.size(); }
|
||||||
|
|
||||||
template <class _Tp, size_t _Sz>
|
template <class _Tp, size_t _Sz>
|
||||||
constexpr size_t size(const _Tp (&__array)[_Sz]) noexcept { return _Sz; }
|
constexpr size_t size(const _Tp (&)[_Sz]) noexcept { return _Sz; }
|
||||||
|
|
||||||
template <class _Cont>
|
template <class _Cont>
|
||||||
constexpr auto empty(const _Cont& __c) -> decltype(__c.empty()) { return __c.empty(); }
|
constexpr auto empty(const _Cont& __c) -> decltype(__c.empty()) { return __c.empty(); }
|
||||||
|
|
||||||
template <class _Tp, size_t _Sz>
|
template <class _Tp, size_t _Sz>
|
||||||
constexpr bool empty(const _Tp (&__array)[_Sz]) noexcept { return false; }
|
constexpr bool empty(const _Tp (&)[_Sz]) noexcept { return false; }
|
||||||
|
|
||||||
template <class _Ep>
|
template <class _Ep>
|
||||||
constexpr bool empty(initializer_list<_Ep> __il) noexcept { return __il.size() == 0; }
|
constexpr bool empty(initializer_list<_Ep> __il) noexcept { return __il.size() == 0; }
|
||||||
|
|
|
@ -655,7 +655,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __copy_assign_alloc(const __list_imp& __c, false_type)
|
void __copy_assign_alloc(const __list_imp&, false_type)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
@ -666,7 +666,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __move_assign_alloc(__list_imp& __c, false_type)
|
void __move_assign_alloc(__list_imp&, false_type)
|
||||||
_NOEXCEPT
|
_NOEXCEPT
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
@ -2336,14 +2336,14 @@ list<_Tp, _Alloc>::__decrementable(const const_iterator* __i) const
|
||||||
|
|
||||||
template <class _Tp, class _Alloc>
|
template <class _Tp, class _Alloc>
|
||||||
bool
|
bool
|
||||||
list<_Tp, _Alloc>::__addable(const const_iterator* __i, ptrdiff_t __n) const
|
list<_Tp, _Alloc>::__addable(const const_iterator*, ptrdiff_t) const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Tp, class _Alloc>
|
template <class _Tp, class _Alloc>
|
||||||
bool
|
bool
|
||||||
list<_Tp, _Alloc>::__subscriptable(const const_iterator* __i, ptrdiff_t __n) const
|
list<_Tp, _Alloc>::__subscriptable(const const_iterator*, ptrdiff_t) const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3932,7 +3932,8 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::underflow()
|
||||||
streamsize __nmemb = _VSTD::min(static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz),
|
streamsize __nmemb = _VSTD::min(static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz),
|
||||||
static_cast<streamsize>(__extbufend_ - __extbufnext_));
|
static_cast<streamsize>(__extbufend_ - __extbufnext_));
|
||||||
codecvt_base::result __r;
|
codecvt_base::result __r;
|
||||||
state_type __svs = __st_;
|
// FIXME: Do we ever need to restore the state here?
|
||||||
|
//state_type __svs = __st_;
|
||||||
streamsize __nr = __bufptr_->sgetn(const_cast<char*>(__extbufnext_), __nmemb);
|
streamsize __nr = __bufptr_->sgetn(const_cast<char*>(__extbufnext_), __nmemb);
|
||||||
if (__nr != 0)
|
if (__nr != 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1605,7 +1605,7 @@ struct _LIBCPP_TYPE_VIS_ONLY allocator_traits
|
||||||
is_trivially_move_constructible<_Tp>::value,
|
is_trivially_move_constructible<_Tp>::value,
|
||||||
void
|
void
|
||||||
>::type
|
>::type
|
||||||
__construct_forward(allocator_type& __a, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2)
|
__construct_forward(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2)
|
||||||
{
|
{
|
||||||
ptrdiff_t _Np = __end1 - __begin1;
|
ptrdiff_t _Np = __end1 - __begin1;
|
||||||
if (_Np > 0)
|
if (_Np > 0)
|
||||||
|
@ -1635,7 +1635,7 @@ struct _LIBCPP_TYPE_VIS_ONLY allocator_traits
|
||||||
is_trivially_move_constructible<_Tp>::value,
|
is_trivially_move_constructible<_Tp>::value,
|
||||||
void
|
void
|
||||||
>::type
|
>::type
|
||||||
__construct_range_forward(allocator_type& __a, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2)
|
__construct_range_forward(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2)
|
||||||
{
|
{
|
||||||
typedef typename remove_const<_Tp>::type _Vp;
|
typedef typename remove_const<_Tp>::type _Vp;
|
||||||
ptrdiff_t _Np = __end1 - __begin1;
|
ptrdiff_t _Np = __end1 - __begin1;
|
||||||
|
@ -1669,7 +1669,7 @@ struct _LIBCPP_TYPE_VIS_ONLY allocator_traits
|
||||||
is_trivially_move_constructible<_Tp>::value,
|
is_trivially_move_constructible<_Tp>::value,
|
||||||
void
|
void
|
||||||
>::type
|
>::type
|
||||||
__construct_backward(allocator_type& __a, _Tp* __begin1, _Tp* __end1, _Tp*& __end2)
|
__construct_backward(allocator_type&, _Tp* __begin1, _Tp* __end1, _Tp*& __end2)
|
||||||
{
|
{
|
||||||
ptrdiff_t _Np = __end1 - __begin1;
|
ptrdiff_t _Np = __end1 - __begin1;
|
||||||
__end2 -= _Np;
|
__end2 -= _Np;
|
||||||
|
@ -2109,7 +2109,7 @@ public:
|
||||||
|
|
||||||
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
|
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__libcpp_compressed_pair_imp(piecewise_construct_t __pc,
|
__libcpp_compressed_pair_imp(piecewise_construct_t,
|
||||||
tuple<_Args1...> __first_args,
|
tuple<_Args1...> __first_args,
|
||||||
tuple<_Args2...> __second_args,
|
tuple<_Args2...> __second_args,
|
||||||
__tuple_indices<_I1...>,
|
__tuple_indices<_I1...>,
|
||||||
|
@ -2164,7 +2164,7 @@ public:
|
||||||
|
|
||||||
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
|
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__libcpp_compressed_pair_imp(piecewise_construct_t __pc,
|
__libcpp_compressed_pair_imp(piecewise_construct_t,
|
||||||
tuple<_Args1...> __first_args,
|
tuple<_Args1...> __first_args,
|
||||||
tuple<_Args2...> __second_args,
|
tuple<_Args2...> __second_args,
|
||||||
__tuple_indices<_I1...>,
|
__tuple_indices<_I1...>,
|
||||||
|
@ -2220,7 +2220,7 @@ public:
|
||||||
|
|
||||||
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
|
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__libcpp_compressed_pair_imp(piecewise_construct_t __pc,
|
__libcpp_compressed_pair_imp(piecewise_construct_t,
|
||||||
tuple<_Args1...> __first_args,
|
tuple<_Args1...> __first_args,
|
||||||
tuple<_Args2...> __second_args,
|
tuple<_Args2...> __second_args,
|
||||||
__tuple_indices<_I1...>,
|
__tuple_indices<_I1...>,
|
||||||
|
@ -2274,7 +2274,7 @@ public:
|
||||||
|
|
||||||
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
|
template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__libcpp_compressed_pair_imp(piecewise_construct_t __pc,
|
__libcpp_compressed_pair_imp(piecewise_construct_t,
|
||||||
tuple<_Args1...> __first_args,
|
tuple<_Args1...> __first_args,
|
||||||
tuple<_Args2...> __second_args,
|
tuple<_Args2...> __second_args,
|
||||||
__tuple_indices<_I1...>,
|
__tuple_indices<_I1...>,
|
||||||
|
|
|
@ -1080,7 +1080,7 @@ operator<=(const optional<_Tp>& __x, nullopt_t) noexcept
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
_LIBCPP_INLINE_VISIBILITY constexpr
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
bool
|
bool
|
||||||
operator<=(nullopt_t, const optional<_Tp>& __x) noexcept
|
operator<=(nullopt_t, const optional<_Tp>&) noexcept
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1096,7 +1096,7 @@ operator>(const optional<_Tp>& __x, nullopt_t) noexcept
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
_LIBCPP_INLINE_VISIBILITY constexpr
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
bool
|
bool
|
||||||
operator>(nullopt_t, const optional<_Tp>& __x) noexcept
|
operator>(nullopt_t, const optional<_Tp>&) noexcept
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1023,7 +1023,7 @@ public:
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
iterator insert(const_iterator __p, value_type&& __v)
|
iterator insert(const_iterator __p, value_type&& __v)
|
||||||
{return __tree_.__insert_multi(_VSTD::move(__v));}
|
{return __tree_.__insert_multi(__p, _VSTD::move(__v));}
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||||
template <class _InputIterator>
|
template <class _InputIterator>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
|
|
@ -191,7 +191,8 @@ void __throw_logic_error(const char*__msg)
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw logic_error(__msg);
|
throw logic_error(__msg);
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
((void)__msg);
|
||||||
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +202,8 @@ void __throw_domain_error(const char*__msg)
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw domain_error(__msg);
|
throw domain_error(__msg);
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
((void)__msg);
|
||||||
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,7 +213,8 @@ void __throw_invalid_argument(const char*__msg)
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw invalid_argument(__msg);
|
throw invalid_argument(__msg);
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
((void)__msg);
|
||||||
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +224,8 @@ void __throw_length_error(const char*__msg)
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw length_error(__msg);
|
throw length_error(__msg);
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
((void)__msg);
|
||||||
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +235,8 @@ void __throw_out_of_range(const char*__msg)
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw out_of_range(__msg);
|
throw out_of_range(__msg);
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
((void)__msg);
|
||||||
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,7 +246,8 @@ void __throw_range_error(const char*__msg)
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw range_error(__msg);
|
throw range_error(__msg);
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
((void)__msg);
|
||||||
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +257,8 @@ void __throw_overflow_error(const char*__msg)
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw overflow_error(__msg);
|
throw overflow_error(__msg);
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
((void)__msg);
|
||||||
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,7 +268,8 @@ void __throw_underflow_error(const char*__msg)
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
throw underflow_error(__msg);
|
throw underflow_error(__msg);
|
||||||
#else
|
#else
|
||||||
_VSTD::abort();
|
((void)__msg);
|
||||||
|
_VSTD::abort();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2220,7 +2220,7 @@ bool __ptr_in_range (const _Tp* __p, const _Tp* __first, const _Tp* __last)
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Tp1, class _Tp2>
|
template <class _Tp1, class _Tp2>
|
||||||
bool __ptr_in_range (const _Tp1* __p, const _Tp2* __first, const _Tp2* __last)
|
bool __ptr_in_range (const _Tp1*, const _Tp2*, const _Tp2*)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -922,6 +922,8 @@ public:
|
||||||
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
|
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
|
||||||
"unordered_map::insert(const_iterator, const value_type&) called with an iterator not"
|
"unordered_map::insert(const_iterator, const value_type&) called with an iterator not"
|
||||||
" referring to this unordered_map");
|
" referring to this unordered_map");
|
||||||
|
#else
|
||||||
|
((void)__p);
|
||||||
#endif
|
#endif
|
||||||
return insert(__x).first;
|
return insert(__x).first;
|
||||||
}
|
}
|
||||||
|
@ -946,6 +948,8 @@ public:
|
||||||
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
|
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
|
||||||
"unordered_map::insert(const_iterator, const value_type&) called with an iterator not"
|
"unordered_map::insert(const_iterator, const value_type&) called with an iterator not"
|
||||||
" referring to this unordered_map");
|
" referring to this unordered_map");
|
||||||
|
#else
|
||||||
|
((void)__p);
|
||||||
#endif
|
#endif
|
||||||
return __table_.__insert_unique(_VSTD::move(__x)).first;
|
return __table_.__insert_unique(_VSTD::move(__x)).first;
|
||||||
}
|
}
|
||||||
|
@ -965,6 +969,8 @@ public:
|
||||||
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
|
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
|
||||||
"unordered_map::insert(const_iterator, value_type&&) called with an iterator not"
|
"unordered_map::insert(const_iterator, value_type&&) called with an iterator not"
|
||||||
" referring to this unordered_map");
|
" referring to this unordered_map");
|
||||||
|
#else
|
||||||
|
((void)__p);
|
||||||
#endif
|
#endif
|
||||||
return insert(_VSTD::forward<_Pp>(__x)).first;
|
return insert(_VSTD::forward<_Pp>(__x)).first;
|
||||||
}
|
}
|
||||||
|
@ -982,6 +988,8 @@ public:
|
||||||
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
|
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
|
||||||
"unordered_map::emplace_hint(const_iterator, args...) called with an iterator not"
|
"unordered_map::emplace_hint(const_iterator, args...) called with an iterator not"
|
||||||
" referring to this unordered_map");
|
" referring to this unordered_map");
|
||||||
|
#else
|
||||||
|
((void)__p);
|
||||||
#endif
|
#endif
|
||||||
return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first;
|
return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first;
|
||||||
}
|
}
|
||||||
|
@ -1015,8 +1023,10 @@ public:
|
||||||
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this,
|
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this,
|
||||||
"unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not"
|
"unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not"
|
||||||
" referring to this unordered_map");
|
" referring to this unordered_map");
|
||||||
|
#else
|
||||||
|
((void)__h);
|
||||||
#endif
|
#endif
|
||||||
return try_emplace(__k, _VSTD::forward<_Args>(__args)...).first;
|
return try_emplace(__k, _VSTD::forward<_Args>(__args)...).first;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class... _Args>
|
template <class... _Args>
|
||||||
|
@ -1027,6 +1037,8 @@ public:
|
||||||
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this,
|
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this,
|
||||||
"unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not"
|
"unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not"
|
||||||
" referring to this unordered_map");
|
" referring to this unordered_map");
|
||||||
|
#else
|
||||||
|
((void)__h);
|
||||||
#endif
|
#endif
|
||||||
return try_emplace(_VSTD::move(__k), _VSTD::forward<_Args>(__args)...).first;
|
return try_emplace(_VSTD::move(__k), _VSTD::forward<_Args>(__args)...).first;
|
||||||
}
|
}
|
||||||
|
@ -1057,15 +1069,17 @@ public:
|
||||||
|
|
||||||
template <class _Vp>
|
template <class _Vp>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
iterator insert_or_assign(const_iterator __h, const key_type& __k, _Vp&& __v)
|
iterator insert_or_assign(const_iterator, const key_type& __k, _Vp&& __v)
|
||||||
{
|
{
|
||||||
|
// FIXME: Add debug mode checking for the iterator input
|
||||||
return insert_or_assign(__k, _VSTD::forward<_Vp>(__v)).first;
|
return insert_or_assign(__k, _VSTD::forward<_Vp>(__v)).first;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Vp>
|
template <class _Vp>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
iterator insert_or_assign(const_iterator __h, key_type&& __k, _Vp&& __v)
|
iterator insert_or_assign(const_iterator, key_type&& __k, _Vp&& __v)
|
||||||
{
|
{
|
||||||
|
// FIXME: Add debug mode checking for the iterator input
|
||||||
return insert_or_assign(_VSTD::move(__k), _VSTD::forward<_Vp>(__v)).first;
|
return insert_or_assign(_VSTD::move(__k), _VSTD::forward<_Vp>(__v)).first;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -821,30 +821,40 @@ private:
|
||||||
// We call annotatations only for the default Allocator because other allocators
|
// We call annotatations only for the default Allocator because other allocators
|
||||||
// may not meet the AddressSanitizer alignment constraints.
|
// may not meet the AddressSanitizer alignment constraints.
|
||||||
// See the documentation for __sanitizer_annotate_contiguous_container for more details.
|
// See the documentation for __sanitizer_annotate_contiguous_container for more details.
|
||||||
void __annotate_contiguous_container
|
|
||||||
(const void *__beg, const void *__end, const void *__old_mid, const void *__new_mid) const
|
|
||||||
{
|
|
||||||
#ifndef _LIBCPP_HAS_NO_ASAN
|
#ifndef _LIBCPP_HAS_NO_ASAN
|
||||||
|
void __annotate_contiguous_container(const void *__beg, const void *__end,
|
||||||
|
const void *__old_mid,
|
||||||
|
const void *__new_mid) const
|
||||||
|
{
|
||||||
|
|
||||||
if (__beg && is_same<allocator_type, __default_allocator_type>::value)
|
if (__beg && is_same<allocator_type, __default_allocator_type>::value)
|
||||||
__sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
|
__sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
void __annotate_new(size_type __current_size) const
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
{
|
void __annotate_contiguous_container(const void*, const void*, const void*,
|
||||||
|
const void*) const {}
|
||||||
|
#endif
|
||||||
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
void __annotate_new(size_type __current_size) const {
|
||||||
__annotate_contiguous_container(data(), data() + capacity(),
|
__annotate_contiguous_container(data(), data() + capacity(),
|
||||||
data() + capacity(), data() + __current_size);
|
data() + capacity(), data() + __current_size);
|
||||||
}
|
}
|
||||||
void __annotate_delete() const
|
|
||||||
{
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
void __annotate_delete() const {
|
||||||
__annotate_contiguous_container(data(), data() + capacity(),
|
__annotate_contiguous_container(data(), data() + capacity(),
|
||||||
data() + size(), data() + capacity());
|
data() + size(), data() + capacity());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __annotate_increase(size_type __n) const
|
void __annotate_increase(size_type __n) const
|
||||||
{
|
{
|
||||||
__annotate_contiguous_container(data(), data() + capacity(),
|
__annotate_contiguous_container(data(), data() + capacity(),
|
||||||
data() + size(), data() + size() + __n);
|
data() + size(), data() + size() + __n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __annotate_shrink(size_type __old_size) const
|
void __annotate_shrink(size_type __old_size) const
|
||||||
{
|
{
|
||||||
__annotate_contiguous_container(data(), data() + capacity(),
|
__annotate_contiguous_container(data(), data() + capacity(),
|
||||||
|
@ -869,8 +879,9 @@ private:
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
struct __RAII_IncreaseAnnotator {
|
struct __RAII_IncreaseAnnotator {
|
||||||
inline __RAII_IncreaseAnnotator(const vector &, size_type __n = 1) {}
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
inline void __done() {}
|
__RAII_IncreaseAnnotator(const vector &, size_type = 1) {}
|
||||||
|
_LIBCPP_INLINE_VISIBILITY void __done() {}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2914,7 +2925,9 @@ typename enable_if
|
||||||
vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last)
|
vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
difference_type __n = _VSTD::distance(__first, __last);
|
difference_type __ns = _VSTD::distance(__first, __last);
|
||||||
|
_LIBCPP_ASSERT(__ns >= 0, "invalid range specified");
|
||||||
|
const size_t __n = static_cast<size_type>(__ns);
|
||||||
if (__n)
|
if (__n)
|
||||||
{
|
{
|
||||||
if (__n > capacity())
|
if (__n > capacity())
|
||||||
|
|
|
@ -28,4 +28,5 @@ int main()
|
||||||
C::iterator i = c.end();
|
C::iterator i = c.end();
|
||||||
T j = *i;
|
T j = *i;
|
||||||
assert(false);
|
assert(false);
|
||||||
|
((void)j);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,5 +31,5 @@ int main()
|
||||||
assert(myconv.converted() == 4);
|
assert(myconv.converted() == 4);
|
||||||
// move construct a new converter and make sure the state is the same.
|
// move construct a new converter and make sure the state is the same.
|
||||||
Myconv myconv2(std::move(myconv));
|
Myconv myconv2(std::move(myconv));
|
||||||
assert(myconv2.converted() == 4);
|
assert(myconv2.converted() == old_converted);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,10 @@
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
constexpr bool a = std::__libcpp_isnan(0.);
|
static_assert(std::__libcpp_isnan(0.) == false, "");
|
||||||
constexpr bool b = std::__libcpp_isinf(0.0);
|
static_assert(std::__libcpp_isinf(0.0) == false, "");
|
||||||
constexpr bool c = std::__libcpp_isfinite(0.0);
|
static_assert(std::__libcpp_isfinite(0.0) == true, "");
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,5 +18,7 @@
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
std::complex<double> cd;
|
std::complex<double> cd;
|
||||||
|
((void)cd);
|
||||||
double x = std::sin(0);
|
double x = std::sin(0);
|
||||||
|
((void)x);
|
||||||
}
|
}
|
||||||
|
|
|
@ -659,11 +659,11 @@ class Configuration(object):
|
||||||
# These warnings should be enabled in order to support the MSVC
|
# These warnings should be enabled in order to support the MSVC
|
||||||
# team using the test suite; They enable the warnings below and
|
# team using the test suite; They enable the warnings below and
|
||||||
# expect the test suite to be clean.
|
# expect the test suite to be clean.
|
||||||
# FIXME: Re-enable this after fixing remaining occurrences.
|
|
||||||
self.cxx.addWarningFlagIfSupported('-Wno-sign-compare')
|
self.cxx.addWarningFlagIfSupported('-Wno-sign-compare')
|
||||||
|
self.cxx.addWarningFlagIfSupported('-Wunused-variable')
|
||||||
|
self.cxx.addWarningFlagIfSupported('-Wunused-parameter')
|
||||||
# FIXME: Enable the two warnings below.
|
# FIXME: Enable the two warnings below.
|
||||||
self.cxx.addWarningFlagIfSupported('-Wno-unused-variable')
|
self.cxx.addWarningFlagIfSupported('-Wno-conversion')
|
||||||
self.cxx.addWarningFlagIfSupported('-Wno-unused-parameter')
|
|
||||||
# TODO(EricWF) Remove the unused warnings once the test suite
|
# TODO(EricWF) Remove the unused warnings once the test suite
|
||||||
# compiles clean with them.
|
# compiles clean with them.
|
||||||
self.cxx.addWarningFlagIfSupported('-Wno-unused-local-typedef')
|
self.cxx.addWarningFlagIfSupported('-Wno-unused-local-typedef')
|
||||||
|
|
|
@ -266,6 +266,7 @@ void test_derived_from_ref_wrap() {
|
||||||
auto& ret2 = std::__invoke(get_fn, d);
|
auto& ret2 = std::__invoke(get_fn, d);
|
||||||
auto& cret2 = std::__invoke_constexpr(get_fn, d);
|
auto& cret2 = std::__invoke_constexpr(get_fn, d);
|
||||||
assert(&ret2 == &x);
|
assert(&ret2 == &x);
|
||||||
|
assert(&cret2 == &x);
|
||||||
auto& ret3 = std::__invoke(get_fn, r2);
|
auto& ret3 = std::__invoke(get_fn, r2);
|
||||||
assert(&ret3 == &x);
|
assert(&ret3 == &x);
|
||||||
}
|
}
|
||||||
|
@ -367,4 +368,4 @@ int main() {
|
||||||
|
|
||||||
test_derived_from_ref_wrap();
|
test_derived_from_ref_wrap();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,4 +21,5 @@ int main()
|
||||||
typedef std::unordered_multimap<int, int> M2;
|
typedef std::unordered_multimap<int, int> M2;
|
||||||
M2::iterator i;
|
M2::iterator i;
|
||||||
M1::iterator j = i;
|
M1::iterator j = i;
|
||||||
|
((void)j);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,10 @@ int main()
|
||||||
};
|
};
|
||||||
C c(a, a + sizeof(a)/sizeof(a[0]));
|
C c(a, a + sizeof(a)/sizeof(a[0]));
|
||||||
C::const_iterator i = c.find(2);
|
C::const_iterator i = c.find(2);
|
||||||
|
C::const_iterator i_next = i;
|
||||||
|
++i_next;
|
||||||
C::iterator j = c.erase(i);
|
C::iterator j = c.erase(i);
|
||||||
|
assert(j == i_next);
|
||||||
|
|
||||||
assert(c.size() == 5);
|
assert(c.size() == 5);
|
||||||
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
|
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
|
||||||
|
@ -93,7 +96,10 @@ int main()
|
||||||
};
|
};
|
||||||
C c(a, a + sizeof(a)/sizeof(a[0]));
|
C c(a, a + sizeof(a)/sizeof(a[0]));
|
||||||
C::const_iterator i = c.find(2);
|
C::const_iterator i = c.find(2);
|
||||||
|
C::const_iterator i_next = i;
|
||||||
|
++i_next;
|
||||||
C::iterator j = c.erase(i);
|
C::iterator j = c.erase(i);
|
||||||
|
assert(j == i_next);
|
||||||
|
|
||||||
assert(c.size() == 5);
|
assert(c.size() == 5);
|
||||||
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
|
typedef std::pair<C::const_iterator, C::const_iterator> Eq;
|
||||||
|
|
|
@ -45,7 +45,11 @@ int main()
|
||||||
};
|
};
|
||||||
C c(a, a + sizeof(a)/sizeof(a[0]));
|
C c(a, a + sizeof(a)/sizeof(a[0]));
|
||||||
C::const_iterator i = c.find(2);
|
C::const_iterator i = c.find(2);
|
||||||
|
C::const_iterator i_next = i;
|
||||||
|
++i_next;
|
||||||
C::iterator j = c.erase(i);
|
C::iterator j = c.erase(i);
|
||||||
|
assert(j == i_next);
|
||||||
|
|
||||||
assert(c.size() == 5);
|
assert(c.size() == 5);
|
||||||
assert(c.count(1) == 2);
|
assert(c.count(1) == 2);
|
||||||
assert(c.count(2) == 1);
|
assert(c.count(2) == 1);
|
||||||
|
@ -68,7 +72,10 @@ int main()
|
||||||
};
|
};
|
||||||
C c(a, a + sizeof(a)/sizeof(a[0]));
|
C c(a, a + sizeof(a)/sizeof(a[0]));
|
||||||
C::const_iterator i = c.find(2);
|
C::const_iterator i = c.find(2);
|
||||||
|
C::const_iterator i_next = i;
|
||||||
|
++i_next;
|
||||||
C::iterator j = c.erase(i);
|
C::iterator j = c.erase(i);
|
||||||
|
assert(j == i_next);
|
||||||
assert(c.size() == 5);
|
assert(c.size() == 5);
|
||||||
assert(c.count(1) == 2);
|
assert(c.count(1) == 2);
|
||||||
assert(c.count(2) == 1);
|
assert(c.count(2) == 1);
|
||||||
|
|
|
@ -21,4 +21,5 @@ int main()
|
||||||
typedef std::unordered_multiset<int> M2;
|
typedef std::unordered_multiset<int> M2;
|
||||||
M2::iterator i;
|
M2::iterator i;
|
||||||
M1::iterator j = i;
|
M1::iterator j = i;
|
||||||
|
((void)j);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <unordered_set>
|
// <unordered_set>
|
||||||
|
|
||||||
// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
|
// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
|
||||||
|
@ -29,23 +31,12 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int,
|
typedef std::unordered_multiset<int,
|
||||||
test_hash<std::hash<int> >,
|
test_hash<std::hash<int> >,
|
||||||
test_compare<std::equal_to<int> >,
|
test_compare<std::equal_to<int> >,
|
||||||
test_allocator<int>
|
test_allocator<int>
|
||||||
> C;
|
> C;
|
||||||
typedef int P;
|
|
||||||
P a[] =
|
|
||||||
{
|
|
||||||
P(1),
|
|
||||||
P(2),
|
|
||||||
P(3),
|
|
||||||
P(4),
|
|
||||||
P(1),
|
|
||||||
P(2)
|
|
||||||
};
|
|
||||||
C c0(7,
|
C c0(7,
|
||||||
test_hash<std::hash<int> >(8),
|
test_hash<std::hash<int> >(8),
|
||||||
test_compare<std::equal_to<int> >(9),
|
test_compare<std::equal_to<int> >(9),
|
||||||
|
@ -105,23 +96,12 @@ int main()
|
||||||
|
|
||||||
assert(c0.empty());
|
assert(c0.empty());
|
||||||
}
|
}
|
||||||
#if TEST_STD_VER >= 11
|
|
||||||
{
|
{
|
||||||
typedef std::unordered_multiset<int,
|
typedef std::unordered_multiset<int,
|
||||||
test_hash<std::hash<int> >,
|
test_hash<std::hash<int> >,
|
||||||
test_compare<std::equal_to<int> >,
|
test_compare<std::equal_to<int> >,
|
||||||
min_allocator<int>
|
min_allocator<int>
|
||||||
> C;
|
> C;
|
||||||
typedef int P;
|
|
||||||
P a[] =
|
|
||||||
{
|
|
||||||
P(1),
|
|
||||||
P(2),
|
|
||||||
P(3),
|
|
||||||
P(4),
|
|
||||||
P(1),
|
|
||||||
P(2)
|
|
||||||
};
|
|
||||||
C c0(7,
|
C c0(7,
|
||||||
test_hash<std::hash<int> >(8),
|
test_hash<std::hash<int> >(8),
|
||||||
test_compare<std::equal_to<int> >(9),
|
test_compare<std::equal_to<int> >(9),
|
||||||
|
@ -181,7 +161,6 @@ int main()
|
||||||
|
|
||||||
assert(c0.empty());
|
assert(c0.empty());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if _LIBCPP_DEBUG >= 1
|
#if _LIBCPP_DEBUG >= 1
|
||||||
{
|
{
|
||||||
std::unordered_multiset<int> s1 = {1, 2, 3};
|
std::unordered_multiset<int> s1 = {1, 2, 3};
|
||||||
|
@ -193,5 +172,4 @@ int main()
|
||||||
assert(s2.size() == 2);
|
assert(s2.size() == 2);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,11 @@ int main()
|
||||||
};
|
};
|
||||||
C c(a, a + sizeof(a)/sizeof(a[0]));
|
C c(a, a + sizeof(a)/sizeof(a[0]));
|
||||||
C::const_iterator i = c.find(2);
|
C::const_iterator i = c.find(2);
|
||||||
|
C::const_iterator i_next = i;
|
||||||
|
++i_next;
|
||||||
C::iterator j = c.erase(i);
|
C::iterator j = c.erase(i);
|
||||||
|
assert(j == i_next);
|
||||||
|
|
||||||
assert(c.size() == 3);
|
assert(c.size() == 3);
|
||||||
assert(c.count(1) == 1);
|
assert(c.count(1) == 1);
|
||||||
assert(c.count(3) == 1);
|
assert(c.count(3) == 1);
|
||||||
|
@ -66,7 +70,11 @@ int main()
|
||||||
};
|
};
|
||||||
C c(a, a + sizeof(a)/sizeof(a[0]));
|
C c(a, a + sizeof(a)/sizeof(a[0]));
|
||||||
C::const_iterator i = c.find(2);
|
C::const_iterator i = c.find(2);
|
||||||
|
C::const_iterator i_next = i;
|
||||||
|
++i_next;
|
||||||
C::iterator j = c.erase(i);
|
C::iterator j = c.erase(i);
|
||||||
|
assert(j == i_next);
|
||||||
|
|
||||||
assert(c.size() == 3);
|
assert(c.size() == 3);
|
||||||
assert(c.count(1) == 1);
|
assert(c.count(1) == 1);
|
||||||
assert(c.count(3) == 1);
|
assert(c.count(3) == 1);
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// <unordered_set>
|
// <unordered_set>
|
||||||
|
|
||||||
// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
|
// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
|
||||||
|
@ -29,23 +31,12 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int,
|
typedef std::unordered_set<int,
|
||||||
test_hash<std::hash<int> >,
|
test_hash<std::hash<int> >,
|
||||||
test_compare<std::equal_to<int> >,
|
test_compare<std::equal_to<int> >,
|
||||||
test_allocator<int>
|
test_allocator<int>
|
||||||
> C;
|
> C;
|
||||||
typedef int P;
|
|
||||||
P a[] =
|
|
||||||
{
|
|
||||||
P(1),
|
|
||||||
P(2),
|
|
||||||
P(3),
|
|
||||||
P(4),
|
|
||||||
P(1),
|
|
||||||
P(2)
|
|
||||||
};
|
|
||||||
C c0(7,
|
C c0(7,
|
||||||
test_hash<std::hash<int> >(8),
|
test_hash<std::hash<int> >(8),
|
||||||
test_compare<std::equal_to<int> >(9),
|
test_compare<std::equal_to<int> >(9),
|
||||||
|
@ -105,23 +96,12 @@ int main()
|
||||||
|
|
||||||
assert(c0.empty());
|
assert(c0.empty());
|
||||||
}
|
}
|
||||||
#if TEST_STD_VER >= 11
|
|
||||||
{
|
{
|
||||||
typedef std::unordered_set<int,
|
typedef std::unordered_set<int,
|
||||||
test_hash<std::hash<int> >,
|
test_hash<std::hash<int> >,
|
||||||
test_compare<std::equal_to<int> >,
|
test_compare<std::equal_to<int> >,
|
||||||
min_allocator<int>
|
min_allocator<int>
|
||||||
> C;
|
> C;
|
||||||
typedef int P;
|
|
||||||
P a[] =
|
|
||||||
{
|
|
||||||
P(1),
|
|
||||||
P(2),
|
|
||||||
P(3),
|
|
||||||
P(4),
|
|
||||||
P(1),
|
|
||||||
P(2)
|
|
||||||
};
|
|
||||||
C c0(7,
|
C c0(7,
|
||||||
test_hash<std::hash<int> >(8),
|
test_hash<std::hash<int> >(8),
|
||||||
test_compare<std::equal_to<int> >(9),
|
test_compare<std::equal_to<int> >(9),
|
||||||
|
@ -181,7 +161,6 @@ int main()
|
||||||
|
|
||||||
assert(c0.empty());
|
assert(c0.empty());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if _LIBCPP_DEBUG >= 1
|
#if _LIBCPP_DEBUG >= 1
|
||||||
{
|
{
|
||||||
std::unordered_set<int> s1 = {1, 2, 3};
|
std::unordered_set<int> s1 = {1, 2, 3};
|
||||||
|
@ -193,5 +172,4 @@ int main()
|
||||||
assert(s2.size() == 2);
|
assert(s2.size() == 2);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,6 +98,8 @@ void checkThrows(any& a)
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
((void)a);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +178,6 @@ void test_cast_to_value() {
|
||||||
Type::reset();
|
Type::reset();
|
||||||
{
|
{
|
||||||
any a((Type(42)));
|
any a((Type(42)));
|
||||||
any const& ca = a;
|
|
||||||
assert(Type::count == 1);
|
assert(Type::count == 1);
|
||||||
assert(Type::copied == 0);
|
assert(Type::copied == 0);
|
||||||
assert(Type::moved == 1);
|
assert(Type::moved == 1);
|
||||||
|
|
|
@ -40,7 +40,6 @@ void doIOTest() {
|
||||||
using namespace fs;
|
using namespace fs;
|
||||||
using Ptr = const CharT*;
|
using Ptr = const CharT*;
|
||||||
using StrStream = std::basic_stringstream<CharT>;
|
using StrStream = std::basic_stringstream<CharT>;
|
||||||
const char* const InCStr = InStr;
|
|
||||||
const Ptr E = OutStr;
|
const Ptr E = OutStr;
|
||||||
const path p((const char*)InStr);
|
const path p((const char*)InStr);
|
||||||
StrStream ss;
|
StrStream ss;
|
||||||
|
|
|
@ -60,6 +60,7 @@ TEST_CASE(test_error_reporting)
|
||||||
&& err.code() == ec;
|
&& err.code() == ec;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)f); ((void)t); ((void)ec);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -62,6 +62,7 @@ TEST_CASE(test_error_reporting)
|
||||||
&& err.code() == ec;
|
&& err.code() == ec;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)f); ((void)t); ((void)ec);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -138,7 +139,6 @@ TEST_CASE(test_attributes_get_copied)
|
||||||
const path file = env.create_file("file1", 42);
|
const path file = env.create_file("file1", 42);
|
||||||
const path dest = env.make_env_path("file2");
|
const path dest = env.make_env_path("file2");
|
||||||
auto st = status(file);
|
auto st = status(file);
|
||||||
perms default_perms = st.permissions();
|
|
||||||
perms new_perms = perms::owner_read;
|
perms new_perms = perms::owner_read;
|
||||||
permissions(file, new_perms);
|
permissions(file, new_perms);
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
|
|
|
@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting)
|
||||||
&& err.code() == ec;
|
&& err.code() == ec;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)f); ((void)t); ((void)ec);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,21 +37,6 @@ TEST_CASE(test_signatures)
|
||||||
|
|
||||||
TEST_CASE(test_error_reporting)
|
TEST_CASE(test_error_reporting)
|
||||||
{
|
{
|
||||||
auto checkThrow = [](path const& f, path const& t, const std::error_code& ec)
|
|
||||||
{
|
|
||||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
|
||||||
try {
|
|
||||||
fs::create_directory_symlink(f, t);
|
|
||||||
return true;
|
|
||||||
} catch (filesystem_error const& err) {
|
|
||||||
return err.path1() == f
|
|
||||||
&& err.code() == ec;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
scoped_test_env env;
|
scoped_test_env env;
|
||||||
const path file = env.create_file("file1", 42);
|
const path file = env.create_file("file1", 42);
|
||||||
const path file2 = env.create_file("file2", 55);
|
const path file2 = env.create_file("file2", 55);
|
||||||
|
|
|
@ -36,21 +36,6 @@ TEST_CASE(test_signatures)
|
||||||
|
|
||||||
TEST_CASE(test_error_reporting)
|
TEST_CASE(test_error_reporting)
|
||||||
{
|
{
|
||||||
auto checkThrow = [](path const& f, path const& t, const std::error_code& ec)
|
|
||||||
{
|
|
||||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
|
||||||
try {
|
|
||||||
fs::create_hard_link(f, t);
|
|
||||||
return true;
|
|
||||||
} catch (filesystem_error const& err) {
|
|
||||||
return err.path1() == f
|
|
||||||
&& err.code() == ec;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
scoped_test_env env;
|
scoped_test_env env;
|
||||||
const path file = env.create_file("file1", 42);
|
const path file = env.create_file("file1", 42);
|
||||||
const path file2 = env.create_file("file2", 55);
|
const path file2 = env.create_file("file2", 55);
|
||||||
|
|
|
@ -37,21 +37,6 @@ TEST_CASE(test_signatures)
|
||||||
|
|
||||||
TEST_CASE(test_error_reporting)
|
TEST_CASE(test_error_reporting)
|
||||||
{
|
{
|
||||||
auto checkThrow = [](path const& f, path const& t, const std::error_code& ec)
|
|
||||||
{
|
|
||||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
|
||||||
try {
|
|
||||||
fs::create_symlink(f, t);
|
|
||||||
return true;
|
|
||||||
} catch (filesystem_error const& err) {
|
|
||||||
return err.path1() == f
|
|
||||||
&& err.code() == ec;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
scoped_test_env env;
|
scoped_test_env env;
|
||||||
const path file = env.create_file("file1", 42);
|
const path file = env.create_file("file1", 42);
|
||||||
const path file2 = env.create_file("file2", 55);
|
const path file2 = env.create_file("file2", 55);
|
||||||
|
|
|
@ -53,6 +53,7 @@ TEST_CASE(test_error_reporting)
|
||||||
&& err.code() == ec;
|
&& err.code() == ec;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)f); ((void)opts); ((void)ec);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -116,7 +117,7 @@ TEST_CASE(basic_permissions_test)
|
||||||
permissions(TC.p, TC.set_perms, ec);
|
permissions(TC.p, TC.set_perms, ec);
|
||||||
TEST_CHECK(!ec);
|
TEST_CHECK(!ec);
|
||||||
auto pp = status(TC.p).permissions();
|
auto pp = status(TC.p).permissions();
|
||||||
TEST_CHECK(status(TC.p).permissions() == TC.expected);
|
TEST_CHECK(pp == TC.expected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ TEST_CASE(test_error_reporting)
|
||||||
&& err.code() == ec;
|
&& err.code() == ec;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)f); ((void)ec);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting)
|
||||||
&& err.code() == ec;
|
&& err.code() == ec;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)f); ((void)ec);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting)
|
||||||
&& err.code() == ec;
|
&& err.code() == ec;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)f); ((void)ec);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,6 +50,7 @@ TEST_CASE(test_error_reporting)
|
||||||
&& err.code() == ec;
|
&& err.code() == ec;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)f); ((void)t); ((void)ec);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -52,6 +52,7 @@ TEST_CASE(test_error_reporting)
|
||||||
&& err.code() == ec;
|
&& err.code() == ec;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)f); ((void)s); ((void)ec);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -57,6 +57,7 @@ TEST_CASE(test_error_reporting)
|
||||||
&& err.code() == ec;
|
&& err.code() == ec;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
((void)f); ((void)ec);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -43,7 +43,7 @@ template <typename T> struct MyHash {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Iter1, typename Iter2>
|
template <typename Iter1, typename Iter2>
|
||||||
void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) {
|
void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned /*max_count*/) {
|
||||||
std::experimental::boyer_moore_searcher<Iter2,
|
std::experimental::boyer_moore_searcher<Iter2,
|
||||||
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>>
|
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>>
|
||||||
s{b2, e2};
|
s{b2, e2};
|
||||||
|
|
|
@ -54,10 +54,12 @@ unsigned count_equal::count = 0;
|
||||||
|
|
||||||
template <typename Iter1, typename Iter2>
|
template <typename Iter1, typename Iter2>
|
||||||
void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) {
|
void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) {
|
||||||
|
count_equal::count = 0;
|
||||||
std::experimental::boyer_moore_searcher<Iter2,
|
std::experimental::boyer_moore_searcher<Iter2,
|
||||||
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>,
|
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>,
|
||||||
count_equal>
|
count_equal>
|
||||||
s{b2, e2};
|
s{b2, e2};
|
||||||
|
assert(count_equal::count <= max_count);
|
||||||
assert(result == std::experimental::search(b1, e1, s));
|
assert(result == std::experimental::search(b1, e1, s));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +80,10 @@ test()
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
|
|
||||||
|
// FIXME: The max_count for this search should be 'sa'
|
||||||
|
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2);
|
||||||
|
|
||||||
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
||||||
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
||||||
int ic[] = {1};
|
int ic[] = {1};
|
||||||
|
@ -93,6 +98,7 @@ test()
|
||||||
const unsigned sh = sizeof(ih)/sizeof(ih[0]);
|
const unsigned sh = sizeof(ih)/sizeof(ih[0]);
|
||||||
int ii[] = {1, 1, 2};
|
int ii[] = {1, 1, 2};
|
||||||
do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3);
|
do_search(Iter1(ih), Iter1(ih+sh), Iter2(ii), Iter2(ii+3), Iter1(ih+3), sh*3);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Iter1, class Iter2>
|
template <class Iter1, class Iter2>
|
||||||
|
@ -112,7 +118,10 @@ test2()
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
|
|
||||||
|
// FIXME: The max_count for this search should be 'sa'
|
||||||
|
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2);
|
||||||
|
|
||||||
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
||||||
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
||||||
char ic[] = {1};
|
char ic[] = {1};
|
||||||
|
|
|
@ -54,7 +54,7 @@ void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned ma
|
||||||
typename std::hash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>, count_equal> s{b2, e2};
|
typename std::hash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>, count_equal> s{b2, e2};
|
||||||
count_equal::count = 0;
|
count_equal::count = 0;
|
||||||
assert(result == std::experimental::search(b1, e1, s));
|
assert(result == std::experimental::search(b1, e1, s));
|
||||||
// assert(count_equal::count <= max_count);
|
assert(count_equal::count <= max_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Iter1, class Iter2>
|
template <class Iter1, class Iter2>
|
||||||
|
@ -74,7 +74,10 @@ test()
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
|
|
||||||
|
// FIXME: The max_count for this search should be 'sa'
|
||||||
|
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2);
|
||||||
|
|
||||||
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
||||||
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
||||||
int ic[] = {1};
|
int ic[] = {1};
|
||||||
|
@ -108,7 +111,8 @@ test2()
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
|
// FIXME: The max_count for this search should be 'sa'
|
||||||
|
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
|
||||||
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
||||||
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
||||||
char ic[] = {1};
|
char ic[] = {1};
|
||||||
|
|
|
@ -42,7 +42,7 @@ template <typename T> struct MyHash {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Iter1, typename Iter2>
|
template <typename Iter1, typename Iter2>
|
||||||
void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) {
|
void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned /*max_count*/) {
|
||||||
std::experimental::boyer_moore_horspool_searcher<Iter2,
|
std::experimental::boyer_moore_horspool_searcher<Iter2,
|
||||||
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>>
|
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>>
|
||||||
s{b2, e2};
|
s{b2, e2};
|
||||||
|
|
|
@ -57,7 +57,9 @@ void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned ma
|
||||||
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>,
|
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>,
|
||||||
count_equal>
|
count_equal>
|
||||||
s{b2, e2};
|
s{b2, e2};
|
||||||
|
count_equal::count = 0;
|
||||||
assert(result == std::experimental::search(b1, e1, s));
|
assert(result == std::experimental::search(b1, e1, s));
|
||||||
|
assert(count_equal::count <= max_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Iter1, class Iter2>
|
template <class Iter1, class Iter2>
|
||||||
|
@ -77,7 +79,8 @@ test()
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
|
// FIXME: The max_count for this search should be 'sa'
|
||||||
|
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
|
||||||
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
||||||
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
||||||
int ic[] = {1};
|
int ic[] = {1};
|
||||||
|
@ -111,7 +114,8 @@ test2()
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
|
// FIXME: The max_count for this search should be 'sa'
|
||||||
|
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
|
||||||
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
||||||
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
||||||
char ic[] = {1};
|
char ic[] = {1};
|
||||||
|
|
|
@ -53,7 +53,7 @@ void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned ma
|
||||||
typename std::hash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>, count_equal> s{b2, e2};
|
typename std::hash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>, count_equal> s{b2, e2};
|
||||||
count_equal::count = 0;
|
count_equal::count = 0;
|
||||||
assert(result == std::experimental::search(b1, e1, s));
|
assert(result == std::experimental::search(b1, e1, s));
|
||||||
// assert(count_equal::count <= max_count);
|
assert(count_equal::count <= max_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Iter1, class Iter2>
|
template <class Iter1, class Iter2>
|
||||||
|
@ -73,7 +73,8 @@ test()
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
|
// FIXME: The max_count for this search should be 'sa'
|
||||||
|
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
|
||||||
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
||||||
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
||||||
int ic[] = {1};
|
int ic[] = {1};
|
||||||
|
@ -107,7 +108,8 @@ test2()
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
|
||||||
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
|
// FIXME: The max_count for this search should be 'sa'
|
||||||
|
do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
|
||||||
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
|
||||||
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
|
||||||
char ic[] = {1};
|
char ic[] = {1};
|
||||||
|
|
|
@ -44,7 +44,7 @@ constexpr bool test0(Input1 in1, Input2 in2, Output out)
|
||||||
|
|
||||||
|
|
||||||
template <typename Input1, typename Input2 = Input1>
|
template <typename Input1, typename Input2 = Input1>
|
||||||
constexpr bool do_test(int dummy = 0)
|
constexpr bool do_test(int = 0)
|
||||||
{
|
{
|
||||||
using S1 = typename std::make_signed<Input1>::type;
|
using S1 = typename std::make_signed<Input1>::type;
|
||||||
using S2 = typename std::make_signed<Input2>::type;
|
using S2 = typename std::make_signed<Input2>::type;
|
||||||
|
|
|
@ -43,7 +43,7 @@ constexpr bool test0(Input1 in1, Input2 in2, Output out)
|
||||||
|
|
||||||
|
|
||||||
template <typename Input1, typename Input2 = Input1>
|
template <typename Input1, typename Input2 = Input1>
|
||||||
constexpr bool do_test(int dummy = 0)
|
constexpr bool do_test(int = 0)
|
||||||
{
|
{
|
||||||
using S1 = typename std::make_signed<Input1>::type;
|
using S1 = typename std::make_signed<Input1>::type;
|
||||||
using S2 = typename std::make_signed<Input2>::type;
|
using S2 = typename std::make_signed<Input2>::type;
|
||||||
|
|
|
@ -55,7 +55,7 @@ public:
|
||||||
class Z
|
class Z
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Z(int i) {TEST_THROW(6);}
|
Z(int) {TEST_THROW(6);}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
Z(Z&&) {TEST_THROW(7);}
|
Z(Z&&) {TEST_THROW(7);}
|
||||||
|
|
||||||
friend constexpr bool operator==(const Z& x, const Z& y) {return x.i_ == y.i_;}
|
friend constexpr bool operator==(const Z& x, const Z& y) {return x.i_ == y.i_;}
|
||||||
friend void swap(Z& x, Z& y) {TEST_THROW(6);}
|
friend void swap(Z&, Z&) {TEST_THROW(6);}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ConstSwappable {
|
struct ConstSwappable {
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
Z(Z&&) {TEST_THROW(7);}
|
Z(Z&&) {TEST_THROW(7);}
|
||||||
|
|
||||||
friend constexpr bool operator==(const Z& x, const Z& y) {return x.i_ == y.i_;}
|
friend constexpr bool operator==(const Z& x, const Z& y) {return x.i_ == y.i_;}
|
||||||
friend void swap(Z& x, Z& y) {TEST_THROW(6);}
|
friend void swap(Z&, Z&) {TEST_THROW(6);}
|
||||||
};
|
};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|
|
@ -27,6 +27,7 @@ void test1 ( std::experimental::basic_string_view<CharT> sv, size_t n, size_t po
|
||||||
try {
|
try {
|
||||||
std::experimental::basic_string_view<CharT> sv1 = sv.substr(pos, n);
|
std::experimental::basic_string_view<CharT> sv1 = sv.substr(pos, n);
|
||||||
assert(false);
|
assert(false);
|
||||||
|
((void)sv1);
|
||||||
} catch (const std::out_of_range&) {
|
} catch (const std::out_of_range&) {
|
||||||
return;
|
return;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
|
|
@ -25,4 +25,5 @@ int main() {
|
||||||
|
|
||||||
P p1(2);
|
P p1(2);
|
||||||
P p2(std::move(p1));
|
P p2(std::move(p1));
|
||||||
|
assert(*p2 == 2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ template <> struct hash<X>
|
||||||
{
|
{
|
||||||
typedef X first_argument_type;
|
typedef X first_argument_type;
|
||||||
|
|
||||||
size_t operator()(const first_argument_type& x1) const
|
size_t operator()(const first_argument_type&) const
|
||||||
{
|
{
|
||||||
return 99;
|
return 99;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,4 +18,5 @@
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
std::ratio<100> x;
|
std::ratio<100> x;
|
||||||
|
((void)x);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,5 +13,6 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
std::experimental::erased_type e;
|
std::experimental::erased_type e;
|
||||||
|
((void)e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,9 +168,6 @@ int main()
|
||||||
catch (std::ios_base::failure&)
|
catch (std::ios_base::failure&)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
ios1.copyfmt(ios2);
|
|
||||||
#endif
|
|
||||||
assert(ios1.rdstate() == std::ios::eofbit);
|
assert(ios1.rdstate() == std::ios::eofbit);
|
||||||
assert(ios1.rdbuf() == &sb1);
|
assert(ios1.rdbuf() == &sb1);
|
||||||
assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase));
|
assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase));
|
||||||
|
@ -193,4 +190,5 @@ int main()
|
||||||
assert(ios1.pword(1) == &d2);
|
assert(ios1.pword(1) == &d2);
|
||||||
assert(ios1.tie() == (std::ostream*)2);
|
assert(ios1.tie() == (std::ostream*)2);
|
||||||
assert(ios1.fill() == '2');
|
assert(ios1.fill() == '2');
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,4 +23,5 @@ int main()
|
||||||
std::ostream_iterator<int> i(outf);
|
std::ostream_iterator<int> i(outf);
|
||||||
std::ostream_iterator<int> j = i;
|
std::ostream_iterator<int> j = i;
|
||||||
assert(outf.good());
|
assert(outf.good());
|
||||||
|
((void)j);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ void operator delete(void* p, const std::nothrow_t&) TEST_NOEXCEPT
|
||||||
std::free(p);
|
std::free(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator delete [] (void* p, std::align_val_t a) TEST_NOEXCEPT
|
void operator delete [] (void* p, std::align_val_t) TEST_NOEXCEPT
|
||||||
{
|
{
|
||||||
++aligned_delete_called;
|
++aligned_delete_called;
|
||||||
std::free(p);
|
std::free(p);
|
||||||
|
|
|
@ -55,7 +55,7 @@ void* operator new[](std::size_t s, std::align_val_t a) TEST_THROW_SPEC(std::bad
|
||||||
return DummyData;
|
return DummyData;
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator delete[](void* p, std::align_val_t a) TEST_NOEXCEPT
|
void operator delete[](void* p, std::align_val_t) TEST_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(new_called == 1);
|
assert(new_called == 1);
|
||||||
--new_called;
|
--new_called;
|
||||||
|
|
|
@ -49,7 +49,7 @@ void operator delete(void* p, const std::nothrow_t&) TEST_NOEXCEPT
|
||||||
std::free(p);
|
std::free(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator delete(void* p, std::align_val_t a) TEST_NOEXCEPT
|
void operator delete(void* p, std::align_val_t) TEST_NOEXCEPT
|
||||||
{
|
{
|
||||||
++aligned_delete_called;
|
++aligned_delete_called;
|
||||||
std::free(p);
|
std::free(p);
|
||||||
|
|
|
@ -55,7 +55,7 @@ void* operator new(std::size_t s, std::align_val_t a) TEST_THROW_SPEC(std::bad_a
|
||||||
return DummyData;
|
return DummyData;
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator delete(void* p, std::align_val_t a) TEST_NOEXCEPT
|
void operator delete(void* p, std::align_val_t) TEST_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(new_called == 1);
|
assert(new_called == 1);
|
||||||
--new_called;
|
--new_called;
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
|
||||||
typedef std::codecvt<char16_t, char, std::mbstate_t> F;
|
typedef std::codecvt<char16_t, char, std::mbstate_t> F;
|
||||||
static_assert((std::is_base_of<std::locale::facet, F>::value), "");
|
static_assert((std::is_base_of<std::locale::facet, F>::value), "");
|
||||||
static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
|
static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
|
||||||
|
@ -38,5 +37,5 @@ int main()
|
||||||
assert(std::has_facet<F>(l));
|
assert(std::has_facet<F>(l));
|
||||||
const F& f = std::use_facet<F>(l);
|
const F& f = std::use_facet<F>(l);
|
||||||
(void)F::id;
|
(void)F::id;
|
||||||
//#endif
|
((void)f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
|
||||||
typedef std::codecvt<char32_t, char, std::mbstate_t> F;
|
typedef std::codecvt<char32_t, char, std::mbstate_t> F;
|
||||||
static_assert((std::is_base_of<std::locale::facet, F>::value), "");
|
static_assert((std::is_base_of<std::locale::facet, F>::value), "");
|
||||||
static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
|
static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
|
||||||
|
@ -38,5 +37,5 @@ int main()
|
||||||
assert(std::has_facet<F>(l));
|
assert(std::has_facet<F>(l));
|
||||||
const F& f = std::use_facet<F>(l);
|
const F& f = std::use_facet<F>(l);
|
||||||
(void)F::id;
|
(void)F::id;
|
||||||
//#endif
|
((void)f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,5 +24,6 @@ int main()
|
||||||
{
|
{
|
||||||
B b;
|
B b;
|
||||||
std::mbstate_t s = b.state();
|
std::mbstate_t s = b.state();
|
||||||
|
((void)s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,4 +22,5 @@ int main()
|
||||||
typedef std::wstring_convert<Codecvt> Myconv;
|
typedef std::wstring_convert<Codecvt> Myconv;
|
||||||
Myconv myconv;
|
Myconv myconv;
|
||||||
std::mbstate_t s = myconv.state();
|
std::mbstate_t s = myconv.state();
|
||||||
|
((void)s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,6 @@ test()
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
typedef std::complex<double> C;
|
typedef std::complex<double> C;
|
||||||
const double pi = std::atan2(+0., -0.);
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,6 @@ test()
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
typedef std::complex<double> C;
|
typedef std::complex<double> C;
|
||||||
const double pi = std::atan2(+0., -0.);
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,6 @@ test()
|
||||||
|
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
const double pi = std::atan2(+0., -0.);
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,6 @@ test()
|
||||||
|
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
const double pi = std::atan2(+0., -0.);
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,6 @@ test()
|
||||||
|
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
const double pi = std::atan2(+0., -0.);
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,6 @@ test()
|
||||||
|
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
const double pi = std::atan2(+0., -0.);
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,6 @@ test()
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
typedef std::complex<double> C;
|
typedef std::complex<double> C;
|
||||||
const double pi = std::atan2(+0., -0.);
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,6 @@ test()
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
typedef std::complex<double> C;
|
typedef std::complex<double> C;
|
||||||
const double pi = std::atan2(+0., -0.);
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,6 @@ test()
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
typedef std::complex<double> C;
|
typedef std::complex<double> C;
|
||||||
const double pi = std::atan2(+0., -0.);
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,6 @@ test()
|
||||||
void test_edges()
|
void test_edges()
|
||||||
{
|
{
|
||||||
typedef std::complex<double> C;
|
typedef std::complex<double> C;
|
||||||
const double pi = std::atan2(+0., -0.);
|
|
||||||
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
|
||||||
for (unsigned i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,6 @@ int main()
|
||||||
// Test return value of assignment.
|
// Test return value of assignment.
|
||||||
{
|
{
|
||||||
int a1[] = {0, 1, 2};
|
int a1[] = {0, 1, 2};
|
||||||
int a2[] = {3, 4, 3};
|
|
||||||
std::valarray<int> v1(a1, 3);
|
std::valarray<int> v1(a1, 3);
|
||||||
std::slice_array<int> s1 = v1[std::slice(1, 1, 1)];
|
std::slice_array<int> s1 = v1[std::slice(1, 1, 1)];
|
||||||
std::slice_array<int> s2 = v1[std::slice(0, 1, 1)];
|
std::slice_array<int> s2 = v1[std::slice(0, 1, 1)];
|
||||||
|
|
|
@ -41,7 +41,6 @@ int main()
|
||||||
typedef int T;
|
typedef int T;
|
||||||
T a1[] = {1, 2, 3, 4, 5};
|
T a1[] = {1, 2, 3, 4, 5};
|
||||||
const unsigned N1 = sizeof(a1)/sizeof(a1[0]);
|
const unsigned N1 = sizeof(a1)/sizeof(a1[0]);
|
||||||
const unsigned N2 = 0;
|
|
||||||
std::valarray<T> v1(a1, N1);
|
std::valarray<T> v1(a1, N1);
|
||||||
std::valarray<T> v2;
|
std::valarray<T> v2;
|
||||||
std::valarray<T> v1_save = v1;
|
std::valarray<T> v1_save = v1;
|
||||||
|
@ -57,7 +56,6 @@ int main()
|
||||||
{
|
{
|
||||||
typedef int T;
|
typedef int T;
|
||||||
T a2[] = {6, 7, 8, 9, 10, 11, 12};
|
T a2[] = {6, 7, 8, 9, 10, 11, 12};
|
||||||
const unsigned N1 = 0;
|
|
||||||
const unsigned N2 = sizeof(a2)/sizeof(a2[0]);
|
const unsigned N2 = sizeof(a2)/sizeof(a2[0]);
|
||||||
std::valarray<T> v1;
|
std::valarray<T> v1;
|
||||||
std::valarray<T> v2(a2, N2);
|
std::valarray<T> v2(a2, N2);
|
||||||
|
@ -73,8 +71,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef int T;
|
typedef int T;
|
||||||
const unsigned N1 = 0;
|
|
||||||
const unsigned N2 = 0;
|
|
||||||
std::valarray<T> v1;
|
std::valarray<T> v1;
|
||||||
std::valarray<T> v2;
|
std::valarray<T> v2;
|
||||||
std::valarray<T> v1_save = v1;
|
std::valarray<T> v1_save = v1;
|
||||||
|
|
|
@ -43,7 +43,6 @@ int main()
|
||||||
typedef int T;
|
typedef int T;
|
||||||
T a1[] = {1, 2, 3, 4, 5};
|
T a1[] = {1, 2, 3, 4, 5};
|
||||||
const unsigned N1 = sizeof(a1)/sizeof(a1[0]);
|
const unsigned N1 = sizeof(a1)/sizeof(a1[0]);
|
||||||
const unsigned N2 = 0;
|
|
||||||
std::valarray<T> v1(a1, N1);
|
std::valarray<T> v1(a1, N1);
|
||||||
std::valarray<T> v2;
|
std::valarray<T> v2;
|
||||||
std::valarray<T> v1_save = v1;
|
std::valarray<T> v1_save = v1;
|
||||||
|
@ -59,7 +58,6 @@ int main()
|
||||||
{
|
{
|
||||||
typedef int T;
|
typedef int T;
|
||||||
T a2[] = {6, 7, 8, 9, 10, 11, 12};
|
T a2[] = {6, 7, 8, 9, 10, 11, 12};
|
||||||
const unsigned N1 = 0;
|
|
||||||
const unsigned N2 = sizeof(a2)/sizeof(a2[0]);
|
const unsigned N2 = sizeof(a2)/sizeof(a2[0]);
|
||||||
std::valarray<T> v1;
|
std::valarray<T> v1;
|
||||||
std::valarray<T> v2(a2, N2);
|
std::valarray<T> v2(a2, N2);
|
||||||
|
@ -75,8 +73,6 @@ int main()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typedef int T;
|
typedef int T;
|
||||||
const unsigned N1 = 0;
|
|
||||||
const unsigned N2 = 0;
|
|
||||||
std::valarray<T> v1;
|
std::valarray<T> v1;
|
||||||
std::valarray<T> v2;
|
std::valarray<T> v2;
|
||||||
std::valarray<T> v1_save = v1;
|
std::valarray<T> v1_save = v1;
|
||||||
|
|
|
@ -44,7 +44,7 @@ constexpr bool test0(Input1 in1, Input2 in2, Output out)
|
||||||
|
|
||||||
|
|
||||||
template <typename Input1, typename Input2 = Input1>
|
template <typename Input1, typename Input2 = Input1>
|
||||||
constexpr bool do_test(int dummy = 0)
|
constexpr bool do_test(int = 0)
|
||||||
{
|
{
|
||||||
using S1 = typename std::make_signed<Input1>::type;
|
using S1 = typename std::make_signed<Input1>::type;
|
||||||
using S2 = typename std::make_signed<Input2>::type;
|
using S2 = typename std::make_signed<Input2>::type;
|
||||||
|
|
|
@ -43,7 +43,7 @@ constexpr bool test0(Input1 in1, Input2 in2, Output out)
|
||||||
|
|
||||||
|
|
||||||
template <typename Input1, typename Input2 = Input1>
|
template <typename Input1, typename Input2 = Input1>
|
||||||
constexpr bool do_test(int dummy = 0)
|
constexpr bool do_test(int = 0)
|
||||||
{
|
{
|
||||||
using S1 = typename std::make_signed<Input1>::type;
|
using S1 = typename std::make_signed<Input1>::type;
|
||||||
using S2 = typename std::make_signed<Input2>::type;
|
using S2 = typename std::make_signed<Input2>::type;
|
||||||
|
|
|
@ -49,6 +49,8 @@ void check_random_device_invalid(const std::string &token) {
|
||||||
LIBCPP_ASSERT(false);
|
LIBCPP_ASSERT(false);
|
||||||
} catch (const std::system_error&) {
|
} catch (const std::system_error&) {
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
((void)token);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ test4()
|
||||||
kurtosis += d2 * d2;
|
kurtosis += d2 * d2;
|
||||||
}
|
}
|
||||||
var /= u.size();
|
var /= u.size();
|
||||||
double dev = std::sqrt(var);
|
//double dev = std::sqrt(var);
|
||||||
// In this case:
|
// In this case:
|
||||||
// skew computes to 0./0. == nan
|
// skew computes to 0./0. == nan
|
||||||
// kurtosis computes to 0./0. == nan
|
// kurtosis computes to 0./0. == nan
|
||||||
|
@ -236,7 +236,7 @@ test5()
|
||||||
kurtosis += d2 * d2;
|
kurtosis += d2 * d2;
|
||||||
}
|
}
|
||||||
var /= u.size();
|
var /= u.size();
|
||||||
double dev = std::sqrt(var);
|
// double dev = std::sqrt(var);
|
||||||
// In this case:
|
// In this case:
|
||||||
// skew computes to 0./0. == nan
|
// skew computes to 0./0. == nan
|
||||||
// kurtosis computes to 0./0. == nan
|
// kurtosis computes to 0./0. == nan
|
||||||
|
@ -389,7 +389,7 @@ test9()
|
||||||
kurtosis += d2 * d2;
|
kurtosis += d2 * d2;
|
||||||
}
|
}
|
||||||
var /= u.size();
|
var /= u.size();
|
||||||
double dev = std::sqrt(var);
|
// double dev = std::sqrt(var);
|
||||||
// In this case:
|
// In this case:
|
||||||
// skew computes to 0./0. == nan
|
// skew computes to 0./0. == nan
|
||||||
// kurtosis computes to 0./0. == nan
|
// kurtosis computes to 0./0. == nan
|
||||||
|
@ -438,7 +438,7 @@ test10()
|
||||||
kurtosis += d2 * d2;
|
kurtosis += d2 * d2;
|
||||||
}
|
}
|
||||||
var /= u.size();
|
var /= u.size();
|
||||||
double dev = std::sqrt(var);
|
// double dev = std::sqrt(var);
|
||||||
// In this case:
|
// In this case:
|
||||||
// skew computes to 0./0. == nan
|
// skew computes to 0./0. == nan
|
||||||
// kurtosis computes to 0./0. == nan
|
// kurtosis computes to 0./0. == nan
|
||||||
|
@ -487,7 +487,7 @@ test11()
|
||||||
kurtosis += d2 * d2;
|
kurtosis += d2 * d2;
|
||||||
}
|
}
|
||||||
var /= u.size();
|
var /= u.size();
|
||||||
double dev = std::sqrt(var);
|
// double dev = std::sqrt(var);
|
||||||
// In this case:
|
// In this case:
|
||||||
// skew computes to 0./0. == nan
|
// skew computes to 0./0. == nan
|
||||||
// kurtosis computes to 0./0. == nan
|
// kurtosis computes to 0./0. == nan
|
||||||
|
|
|
@ -193,8 +193,8 @@ test4()
|
||||||
kurtosis -= 3;
|
kurtosis -= 3;
|
||||||
double x_mean = d.k() * (1 - d.p()) / d.p();
|
double x_mean = d.k() * (1 - d.p()) / d.p();
|
||||||
double x_var = x_mean / d.p();
|
double x_var = x_mean / d.p();
|
||||||
double x_skew = (2 - d.p()) / std::sqrt(d.k() * (1 - d.p()));
|
// double x_skew = (2 - d.p()) / std::sqrt(d.k() * (1 - d.p()));
|
||||||
double x_kurtosis = 6. / d.k() + sqr(d.p()) / (d.k() * (1 - d.p()));
|
// double x_kurtosis = 6. / d.k() + sqr(d.p()) / (d.k() * (1 - d.p()));
|
||||||
assert(mean == x_mean);
|
assert(mean == x_mean);
|
||||||
assert(var == x_var);
|
assert(var == x_var);
|
||||||
}
|
}
|
||||||
|
|
|
@ -617,11 +617,12 @@ int main()
|
||||||
}
|
}
|
||||||
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
|
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
|
||||||
*/ {
|
*/ {
|
||||||
|
/*
|
||||||
std::cmatch m;
|
std::cmatch m;
|
||||||
const char s[] = "m";
|
const char s[] = "m";
|
||||||
/* assert(std::regex_match(s, m,*/ std::regex("[a[=M=]z]"/*,
|
assert(std::regex_match(s, m, std::regex("[a[=M=]z]",
|
||||||
std::regex_constants::awk*/);//));
|
std::regex_constants::awk);
|
||||||
/* assert(m.size() == 1);
|
assert(m.size() == 1);
|
||||||
assert(!m.prefix().matched);
|
assert(!m.prefix().matched);
|
||||||
assert(m.prefix().first == s);
|
assert(m.prefix().first == s);
|
||||||
assert(m.prefix().second == m[0].first);
|
assert(m.prefix().second == m[0].first);
|
||||||
|
|
|
@ -37,6 +37,8 @@ extern "C" void LLVMFuzzerTestOneInput(const char *data)
|
||||||
}
|
}
|
||||||
catch (std::regex_error &) {}
|
catch (std::regex_error &) {}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
((void)data);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
char s1[] = {1, 2, 3};
|
|
||||||
char s2[3] = {0};
|
char s2[3] = {0};
|
||||||
assert(std::char_traits<char>::assign(s2, 3, char(5)) == s2);
|
assert(std::char_traits<char>::assign(s2, 3, char(5)) == s2);
|
||||||
assert(s2[0] == char(5));
|
assert(s2[0] == char(5));
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
char16_t s1[] = {1, 2, 3};
|
|
||||||
char16_t s2[3] = {0};
|
char16_t s2[3] = {0};
|
||||||
assert(std::char_traits<char16_t>::assign(s2, 3, char16_t(5)) == s2);
|
assert(std::char_traits<char16_t>::assign(s2, 3, char16_t(5)) == s2);
|
||||||
assert(s2[0] == char16_t(5));
|
assert(s2[0] == char16_t(5));
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
char32_t s1[] = {1, 2, 3};
|
|
||||||
char32_t s2[3] = {0};
|
char32_t s2[3] = {0};
|
||||||
assert(std::char_traits<char32_t>::assign(s2, 3, char32_t(5)) == s2);
|
assert(std::char_traits<char32_t>::assign(s2, 3, char32_t(5)) == s2);
|
||||||
assert(s2[0] == char32_t(5));
|
assert(s2[0] == char32_t(5));
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
wchar_t s1[] = {1, 2, 3};
|
|
||||||
wchar_t s2[3] = {0};
|
wchar_t s2[3] = {0};
|
||||||
assert(std::char_traits<wchar_t>::assign(s2, 3, wchar_t(5)) == s2);
|
assert(std::char_traits<wchar_t>::assign(s2, 3, wchar_t(5)) == s2);
|
||||||
assert(s2[0] == wchar_t(5));
|
assert(s2[0] == wchar_t(5));
|
||||||
|
|
|
@ -72,7 +72,7 @@ std::unique_ptr<int> f4(std::unique_ptr<int>&& p)
|
||||||
void f5(int j)
|
void f5(int j)
|
||||||
{
|
{
|
||||||
std::this_thread::sleep_for(ms(200));
|
std::this_thread::sleep_for(ms(200));
|
||||||
TEST_THROW(j);
|
TEST_THROW(j); ((void)j);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Ret, class CheckLamdba, class ...Args>
|
template <class Ret, class CheckLamdba, class ...Args>
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
void func(std::promise<int> p)
|
void func(std::promise<int> p)
|
||||||
{
|
{
|
||||||
const int i = 5;
|
|
||||||
p.set_exception_at_thread_exit(std::make_exception_ptr(3));
|
p.set_exception_at_thread_exit(std::make_exception_ptr(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
long operator()(long i, long j) const {return data_ + i + j;}
|
long operator()(long i, long j) const {return data_ + i + j;}
|
||||||
};
|
};
|
||||||
|
|
||||||
void func(std::packaged_task<double(int, char)> p)
|
void func(std::packaged_task<double(int, char)>)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,8 @@ void func2(std::packaged_task<double(int, char)> p)
|
||||||
{
|
{
|
||||||
assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied));
|
assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
((void)p);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +76,8 @@ void func3(std::packaged_task<double(int, char)> p)
|
||||||
{
|
{
|
||||||
assert(e.code() == make_error_code(std::future_errc::no_state));
|
assert(e.code() == make_error_code(std::future_errc::no_state));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
((void)p);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,8 @@ void func2(std::packaged_task<double(int, char)> p)
|
||||||
{
|
{
|
||||||
assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied));
|
assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
((void)p);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +76,8 @@ void func3(std::packaged_task<double(int, char)> p)
|
||||||
{
|
{
|
||||||
assert(e.code() == make_error_code(std::future_errc::no_state));
|
assert(e.code() == make_error_code(std::future_errc::no_state));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
((void)p);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue