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