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

An attribute that decides whether a member of a struct is (de)serialized at all depending on external data, typically previously deserialized. More...

#include <uSer.hh>

Detailed Description

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

An attribute that decides whether a member of a struct is (de)serialized at all depending on external data, typically previously deserialized.

This can be applied to any type. 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 bool. In the first four cases, the return type must be convertible to bool. For cases 2-3, a reference to the struct is passed as an argument.

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