003 File Manager
Current Path:
/usr/src/contrib/llvm-project/libcxx/include/experimental
usr
/
src
/
contrib
/
llvm-project
/
libcxx
/
include
/
experimental
/
📁
..
📄
__config
(3.24 KB)
📄
__memory
(2.68 KB)
📄
algorithm
(1.42 KB)
📄
coroutine
(10.07 KB)
📄
deque
(1.12 KB)
📄
filesystem
(8.94 KB)
📄
forward_list
(1.18 KB)
📄
functional
(17.31 KB)
📄
iterator
(3.82 KB)
📄
list
(1.11 KB)
📄
map
(1.67 KB)
📄
memory_resource
(13.07 KB)
📄
propagate_const
(20.04 KB)
📄
regex
(1.75 KB)
📄
set
(1.6 KB)
📄
simd
(59.83 KB)
📄
string
(1.74 KB)
📄
type_traits
(5.36 KB)
📄
unordered_map
(1.97 KB)
📄
unordered_set
(1.78 KB)
📄
utility
(1.01 KB)
📄
vector
(1.13 KB)
Editing: __memory
// -*- C++ -*- //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP_EXPERIMENTAL___MEMORY #define _LIBCPP_EXPERIMENTAL___MEMORY #include <experimental/__config> #include <experimental/utility> // for erased_type #include <__functional_base> #include <type_traits> _LIBCPP_BEGIN_NAMESPACE_LFTS template < class _Tp, class _Alloc , bool = uses_allocator<_Tp, _Alloc>::value , bool = __has_allocator_type<_Tp>::value > struct __lfts_uses_allocator : public false_type {}; template <class _Tp, class _Alloc> struct __lfts_uses_allocator<_Tp, _Alloc, false, false> : public false_type {}; template <class _Tp, class _Alloc, bool HasAlloc> struct __lfts_uses_allocator<_Tp, _Alloc, true, HasAlloc> : public true_type {}; template <class _Tp, class _Alloc> struct __lfts_uses_allocator<_Tp, _Alloc, false, true> : public integral_constant<bool , is_convertible<_Alloc, typename _Tp::allocator_type>::value || is_same<erased_type, typename _Tp::allocator_type>::value > {}; template <bool _UsesAlloc, class _Tp, class _Alloc, class ..._Args> struct __lfts_uses_alloc_ctor_imp { static const int value = 0; }; template <class _Tp, class _Alloc, class ..._Args> struct __lfts_uses_alloc_ctor_imp<true, _Tp, _Alloc, _Args...> { static const bool __ic_first = is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value; static const bool __ic_second = conditional< __ic_first, false_type, is_constructible<_Tp, _Args..., _Alloc> >::type::value; static_assert(__ic_first || __ic_second, "Request for uses allocator construction is ill-formed"); static const int value = __ic_first ? 1 : 2; }; template <class _Tp, class _Alloc, class ..._Args> struct __lfts_uses_alloc_ctor : integral_constant<int, __lfts_uses_alloc_ctor_imp< __lfts_uses_allocator<_Tp, _Alloc>::value , _Tp, _Alloc, _Args... >::value > {}; template <class _Tp, class _Alloc, class ..._Args> inline _LIBCPP_INLINE_VISIBILITY void __lfts_user_alloc_construct( _Tp * __store, const _Alloc & __a, _Args &&... __args) { _VSTD::__user_alloc_construct_impl( typename __lfts_uses_alloc_ctor<_Tp, _Alloc, _Args...>::type() , __store, __a, _VSTD::forward<_Args>(__args)... ); } _LIBCPP_END_NAMESPACE_LFTS #endif /* _LIBCPP_EXPERIMENTAL___MEMORY */
Upload File
Create Folder