29 template<
typename T,
typename U>
64 : m_storage(other.
value()) {}
77 template<
typename... Args>
81 template<
typename U,
typename... Args>
84 : m_storage(list,
util::forward<Args>(args)...) {}
94 rebind(other.value());
101 rebind(util::move(other).
value());
108 rebind(other.
value());
115 rebind(util::move(other).
value());
119 template<
typename U = T>
123 rebind(util::forward<U>(
value));
127 constexpr auto value() & -> T& {
return m_storage; }
128 constexpr auto value() const& -> T const& {
return m_storage; }
129 constexpr auto value() && -> T&& {
return util::move(m_storage); }
130 constexpr auto value() const&& -> T const&& {
return util::move(m_storage); }
132 template<
typename... Args>
134 constexpr auto emplace(Args&&... args) -> T& {
140 template<
typename U,
typename... Args>
142 constexpr auto emplace(std::initializer_list<U> list, Args&&... args) -> T& {
150 constexpr void rebind(U&& new_value) {
157 if constexpr (const_assignable || !assignable) {
161 m_storage = util::forward<U>(new_value);
165 Storage m_storage {};
Definition rebindable_box.h:42
constexpr auto value() const &&-> T const &&
Definition rebindable_box.h:130
constexpr auto operator=(RebindableBox const &) -> RebindableBox &=default
constexpr auto value() &&-> T &&
Definition rebindable_box.h:129
constexpr auto value() &-> T &
Definition rebindable_box.h:127
constexpr RebindableBox(RebindableBox &&)=default
constexpr auto operator=(RebindableBox const &other) -> RebindableBox &requires(!concepts::TriviallyMoveAssignable< Storage > &&concepts::MoveConstructible< Storage >)
Definition rebindable_box.h:98
constexpr ~RebindableBox()=default
constexpr RebindableBox(RebindableBox const &)=delete
constexpr RebindableBox(types::InPlace, Args &&... args)
Definition rebindable_box.h:79
constexpr RebindableBox()=default
constexpr auto operator=(RebindableBox const &other) -> RebindableBox &requires(!concepts::TriviallyCopyAssignable< Storage > &&concepts::CopyConstructible< Storage >)
Definition rebindable_box.h:91
constexpr auto operator=(RebindableBox &&) -> RebindableBox &=default
constexpr RebindableBox(RebindableBox const &)=default
constexpr auto value() const &-> T const &
Definition rebindable_box.h:128
constexpr auto emplace(std::initializer_list< U > list, Args &&... args) -> T &
Definition rebindable_box.h:142
constexpr RebindableBox(U &&value)
Definition rebindable_box.h:75
constexpr auto emplace(Args &&... args) -> T &
Definition rebindable_box.h:134
constexpr RebindableBox(types::InPlace, std::initializer_list< U > list, Args &&... args)
Definition rebindable_box.h:83
Definition operations.h:19
Definition operations.h:11
Definition operations.h:99
Definition operations.h:34
Definition operations.h:24
Definition operations.h:43
Definition rebindable_box.h:38
Definition rebindable_box.h:30
RebindableBox(T &&) -> RebindableBox< meta::UnwrapRefDecay< T > >
constexpr auto make_rebindable_box(T &&value)
Definition rebindable_box.h:172
constexpr auto destroy_at
Definition destroy_at.h:24
constexpr auto construct_at
Definition construct_at.h:27
Definition zstring_parser.h:9