Any++
Loading...
Searching...
No Matches
anyxx::val Union Reference

Proxy to manage the captured object as value with small object optimization. More...

#include <anyxx.hpp>

Public Member Functions

 val (mutable_void ptr=0)
 val (val const &other) noexcept
val & operator= (val const &other) noexcept

Public Attributes

heap_data heap
local_data< false > local
local_data< true > trivial

Detailed Description

Proxy to manage the captured object as value with small object optimization.

  • If you forward an object to any constructor, this object will be forwarded to the allocated storage.
  • To pass an object as second parameter, with the std::in_place tag as first, has the same behavior as above
  • If you pass as first parameter std::in_place_type<...>, the object will be constructed in place in the allocated memory with the other arguments forwarded
Examples
_3_any_range.cpp, and _5_any_template.cpp.

The documentation for this union was generated from the following file: