[info] type_name = "std::pair" ctype = "PAIR_TYPE" header = "utility" # Old: typeName = "std::pair<" ns = ["namespace std"] numTemplateParams = 2 replaceTemplateParamIndex = [] [codegen] decl = """ template void getSizeType(const %1% &container, size_t& returnArg); """ func = """ template void getSizeType(const %1% &container, size_t& returnArg) { SAVE_SIZE(sizeof(%1%) - sizeof(P) - sizeof(Q)); getSizeType(container.first, returnArg); getSizeType(container.second, returnArg); } """ traversal_func = """ return OIInternal::getSizeType( container.second, returnArg.delegate([&container](auto ret) { return OIInternal::getSizeType(container.first, ret); }) ); """ [[codegen.processor]] type = "types::st::Pair::type, typename TypeHandler::type>" func = """ static constexpr auto firstField = make_field("first"); static constexpr auto secondField = make_field("second"); el.exclusive_size = sizeof(std::pair) - sizeof(T0) - sizeof(T1); stack_ins(secondField); stack_ins(firstField); """