MIRA
TransparentMissingDelegateTo< DelegatingType, SerializerTag > Struct Template Reference

Helper to show a warning at compile time if DelegateTo is missing in IsTransparentSerializable<DelegatingType>. More...

#include <serialization/RecursiveMemberReflector.h>

Detailed Description

template<typename DelegatingType, typename SerializerTag>
struct mira::serialization::TransparentMissingDelegateTo< DelegatingType, SerializerTag >

Helper to show a warning at compile time if DelegateTo is missing in IsTransparentSerializable<DelegatingType>.

Calling TransparentMissingDelegateTo<T, SerializerTag>::warn() will issue a warning at compile time and do nothing at runtime. Define the type DelegateTo in the specialization of IsTransparentSerializable to solve the issue. Some reflectors depend on inferring this type to implement certain functionality.

If that definition is not possible (because e.g it cannot be decided at compile time), the warning can be suppressed by specializing TransparentMissingDelegateTo:

template<typename SerializerTag>
struct TransparentMissingDelegateTo<MyDelegatingType, SerializerTag>
{
constexpr static void warn(){}
};

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