[info] type_name = "std::optional" ctype = "OPTIONAL_TYPE" header = "optional" # Old: typeName = "std::optional<" ns = ["namespace std"] numTemplateParams = 1 [codegen] decl = """ template void getSizeType(const %1% &container, size_t& returnArg); """ func = """ template void getSizeType(const %1%& container, size_t& returnArg) { if (container) { SAVE_SIZE(sizeof(%1%) - sizeof(T)); SAVE_DATA(true); getSizeType(*container, returnArg); } else { SAVE_SIZE(sizeof(%1%)); SAVE_DATA(false); } } """