µSer
uSer::Dyn::Size< Ref > Struct Template Reference

An attribute that defines the size of a container that is a member of a struct to depend on external data, typically previously deserialized. More...

#include <uSer.hh>

Detailed Description

template<auto Ref>
struct uSer::Dyn::Size< Ref >

An attribute that defines the size of a container that is a member of a struct to depend on external data, typically previously deserialized.

This can be applied to C arrays (possibly pointed to by (smart) pointers), std::array, or any other container that supports iterators. The reference can be:

  1. A non-static member function of the surrounding struct
  2. A free function (=function pointer)
  3. A static member function of any class (=function pointer)
  4. A pointer to a global object that has operator () overloaded
  5. A member variable pointer to a member of the surrounding struct, which must be convertible to std::size_t. In the first four cases, the return type must be convertible to std::size_t. For cases 2-4, a reference to the struct is passed as an argument.

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