MCPcopy Create free account
hub / github.com/Naios/function2 / box

Class box

include/function2/function2.hpp:374–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372/// Store the allocator inside the box
373template <bool IsCopyable, typename T, typename Allocator>
374struct box : private Allocator {
375 friend box_factory<box>;
376
377 T value_;
378
379 explicit box(T value, Allocator allocator_)
380 : Allocator(std::move(allocator_)), value_(std::move(value)) {
381 }
382
383 box(box&&) = default;
384 box(box const&) = default;
385 box& operator=(box&&) = default;
386 box& operator=(box const&) = default;
387 ~box() = default;
388};
389template <typename T, typename Allocator>
390struct box<false, T, Allocator> : private Allocator {
391 friend box_factory<box>;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected