81 std::function<void(TAR*)>
dtor_{};
88 dtor_ = std::forward<FUN> (dtor);
95 auto destructionFun = std::move(
dtor_);
104 TAR*
target() {
return static_cast<TAR*
>(
this); }
116 ArrayBucket (
size_t storageSize,
size_t buffStart,
size_t elmSize =
sizeof(I))
119 ,
buffSiz{storageSize - buffStart}
138 return reinterpret_cast<std::byte*
>(
this) +
buffOffset;
147 return * std::launder (
reinterpret_cast<I*
> (elm));
182 std::swap (
data_, rr.data_);
186 std::swap (
data_, rr.data_);
191 operator std::string()
const;
215 return const_cast<Several&
>(*this).operator[] (idx);
255 if (requiredSize <
spread())
257 size_t extraSize{requiredSize * newElms};
258 if (requiredSize >
spread())
259 extraSize += (requiredSize -
spread())*
size();
Subscript-index based access to a container, packaged as iterator.
Abstraction: Fixed array of elements.
meta::RefTraits< I >::Value value_type
friend auto end(Several const &svl)
size_t storageBuffSiz() const
const_iterator begin() const
friend auto begin(Several const &svl)
value_type const & const_reference
bool hasReserve(size_t requiredSize, size_t newElms=1) const
I & operator[](size_t idx)
friend auto end(Several &svl)
Several()=default
usually to be created through SeveralBuilder
const_iterator end() const
Several & operator=(Several &&rr)
meta::RefTraits< I >::Reference reference
friend auto begin(Several &svl)
void installDestructor(FUN &&dtor)
std::function< void(TAR *)> dtor_
Types marked with this mix-in may be moved and move-assigned.
#define ERROR_LOG_AND_IGNORE(_FLAG_, _OP_DESCR_)
convenience shortcut for a sequence of catch blocks just logging and consuming an error.
Iterator-style access handle to a referred container with subscript index.
Implementation namespace for support and library code.
string toStringBracket(COLL &&coll)
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Metadata record placed immediately before the data storage.
static constexpr size_t storageOffset
std::byte * storage()
data storage area starts immediately behind the ArrayBucket
std::function< void(ArrayBucket *)> Deleter
ArrayBucket(size_t storageSize, size_t buffStart, size_t elmSize=sizeof(I))
I & subscript(size_t idx)
perform unchecked access into the storage area
size_t getAllocSize() const