Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Go to the documentation of this file. 18 template <
typename U,
typename MP>
21 template <
typename U,
typename MP>
22 struct refcount_atom_impl;
40 struct holder : MemoryPolicy::refcount
44 template <
typename... Args>
45 holder(Args&&... args) :
value{std::forward<Args>(args)...} {}
48 using heap =
typename MemoryPolicy::heap::type;
66 template <
typename Arg,
67 typename Enable=std::enable_if_t<
68 !std::is_same<box, std::decay_t<Arg>>::value &&
69 std::is_constructible<T, Arg>::value>>
71 :
impl_{detail::make<heap, holder>(std::forward<Arg>(arg))} {}
76 template <
typename Arg1,
typename Arg2,
typename... Args>
77 box(Arg1&& arg1, Arg2&& arg2, Args&& ...args)
78 :
impl_{detail::make<heap, holder>(
79 std::forward<Arg1>(arg1),
80 std::forward<Arg2>(arg2),
81 std::forward<Args>(args)...)}
108 operator const T&()
const {
return get(); }
124 {
return !(*
this == other.
value); }
125 bool operator<(detail::exact_t<const box&> other)
const 126 {
return get() < other.value.get(); }
143 template <
typename Fn>
146 return std::forward<Fn>(fn)(
get());
148 template <
typename Fn>
155 return std::move(*
this);
163 template <
typename T,
typename MP>
168 return std::hash<T>{}(*x);
box(Arg1 &&arg1, Arg2 &&arg2, Args &&...args)
box && update(Fn &&fn) &&
friend void swap(box &a, box &b)
typename MemoryPolicy::heap::type heap
bool operator==(detail::exact_t< const box &> other) const
box update(Fn &&fn) const &
box & operator=(box &&other)
memory_policy< default_heap_policy, default_refcount_policy > default_memory_policy
box & operator=(const box &other)
const T & operator*() const
bool operator!=(detail::exact_t< const box &> other) const
MemoryPolicy memory_policy
const T * operator->() const