Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <box.hpp>
|
using | heap = typename MemoryPolicy::heap::type |
|
template<typename T, typename MemoryPolicy = default_memory_policy>
class immer::box< T, MemoryPolicy >
Immutable box for a single value of type T
.
The box is always copiable and movable. The T
copy or move operations are never called. Since a box is immutable, copying or moving just copy the underlying pointers.
Definition at line 35 of file box.hpp.
◆ heap
template<typename T, typename MemoryPolicy = default_memory_policy>
using immer::box< T, MemoryPolicy >::heap = typename MemoryPolicy::heap::type |
|
private |
◆ memory_policy
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ value_type
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ box() [1/6]
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ box() [2/6]
template<typename T, typename MemoryPolicy = default_memory_policy>
Constructs a box holding T{}
.
Definition at line 61 of file box.hpp.
◆ box() [3/6]
template<typename T, typename MemoryPolicy = default_memory_policy>
template<typename Arg , typename Enable = std::enable_if_t< !std::is_same<box, std::decay_t<Arg>>::value && std::is_constructible<T, Arg>::value>>
Constructs a box holding T{arg}
Definition at line 70 of file box.hpp.
◆ box() [4/6]
template<typename T, typename MemoryPolicy = default_memory_policy>
template<typename Arg1 , typename Arg2 , typename... Args>
immer::box< T, MemoryPolicy >::box |
( |
Arg1 && |
arg1, |
|
|
Arg2 && |
arg2, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Constructs a box holding T{arg1, arg2, args...}
Definition at line 77 of file box.hpp.
◆ box() [5/6]
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ box() [6/6]
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ ~box()
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ get()
template<typename T, typename MemoryPolicy = default_memory_policy>
const T& immer::box< T, MemoryPolicy >::get |
( |
| ) |
const |
|
inline |
◆ operator const T &()
template<typename T, typename MemoryPolicy = default_memory_policy>
immer::box< T, MemoryPolicy >::operator const T & |
( |
| ) |
const |
|
inline |
Conversion to the boxed type.
Definition at line 108 of file box.hpp.
◆ operator!=()
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ operator*()
template<typename T, typename MemoryPolicy = default_memory_policy>
const T& immer::box< T, MemoryPolicy >::operator* |
( |
| ) |
const |
|
inline |
Access via dereference
Definition at line 111 of file box.hpp.
◆ operator->()
template<typename T, typename MemoryPolicy = default_memory_policy>
const T* immer::box< T, MemoryPolicy >::operator-> |
( |
| ) |
const |
|
inline |
Access via pointer member access
Definition at line 114 of file box.hpp.
◆ operator<()
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ operator=() [1/2]
template<typename T, typename MemoryPolicy = default_memory_policy>
box& immer::box< T, MemoryPolicy >::operator= |
( |
box< T, MemoryPolicy > && |
other | ) |
|
|
inline |
◆ operator=() [2/2]
template<typename T, typename MemoryPolicy = default_memory_policy>
box& immer::box< T, MemoryPolicy >::operator= |
( |
const box< T, MemoryPolicy > & |
other | ) |
|
|
inline |
◆ operator==()
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ update() [1/2]
template<typename T, typename MemoryPolicy = default_memory_policy>
template<typename Fn >
Returns a new box built by applying the fn
to the underlying value.
Example .. literalinclude:: ../example/box/box.cpp :language: c++ :dedent: 8 :start-after: update/start :end-before: update/end
Definition at line 144 of file box.hpp.
◆ update() [2/2]
template<typename T, typename MemoryPolicy = default_memory_policy>
template<typename Fn >
◆ detail::gc_atom_impl< T, MemoryPolicy >
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ detail::refcount_atom_impl< T, MemoryPolicy >
template<typename T, typename MemoryPolicy = default_memory_policy>
◆ swap
template<typename T, typename MemoryPolicy = default_memory_policy>
void swap |
( |
box< T, MemoryPolicy > & |
a, |
|
|
box< T, MemoryPolicy > & |
b |
|
) |
| |
|
friend |
◆ impl_
template<typename T, typename MemoryPolicy = default_memory_policy>
Definition at line 50 of file box.hpp.
Referenced by immer::box< T, MemoryPolicy >::box(), immer::detail::gc_atom_impl< T, MemoryPolicy >::exchange(), immer::detail::gc_atom_impl< T, MemoryPolicy >::gc_atom_impl(), immer::box< T, MemoryPolicy >::get(), immer::box< T, MemoryPolicy >::operator==(), immer::detail::gc_atom_impl< T, MemoryPolicy >::store(), immer::detail::refcount_atom_impl< T, MemoryPolicy >::update(), immer::box< T, MemoryPolicy >::update(), and immer::box< T, MemoryPolicy >::~box().
The documentation for this class was generated from the following file: