2022-12-19 14:37:51 +00:00
|
|
|
[info]
|
2023-05-23 22:26:38 +01:00
|
|
|
type_name = "std::pair"
|
2022-12-19 14:37:51 +00:00
|
|
|
ctype = "PAIR_TYPE"
|
|
|
|
header = "utility"
|
2023-05-23 22:26:38 +01:00
|
|
|
|
|
|
|
# Old:
|
|
|
|
typeName = "std::pair<"
|
2022-12-19 14:37:51 +00:00
|
|
|
ns = ["namespace std"]
|
2023-05-23 22:26:38 +01:00
|
|
|
numTemplateParams = 2
|
2022-12-19 14:37:51 +00:00
|
|
|
replaceTemplateParamIndex = []
|
|
|
|
|
|
|
|
[codegen]
|
|
|
|
decl = """
|
|
|
|
template<typename P, typename Q>
|
2023-05-23 22:26:38 +01:00
|
|
|
void getSizeType(const %1%<P,Q> &container, size_t& returnArg);
|
2022-12-19 14:37:51 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
func = """
|
|
|
|
template<typename P, typename Q>
|
2023-05-23 22:26:38 +01:00
|
|
|
void getSizeType(const %1%<P,Q> &container, size_t& returnArg)
|
2022-12-19 14:37:51 +00:00
|
|
|
{
|
|
|
|
SAVE_SIZE(sizeof(%1%<P,Q>) - sizeof(P) - sizeof(Q));
|
|
|
|
|
2023-05-23 22:26:38 +01:00
|
|
|
getSizeType(container.first, returnArg);
|
|
|
|
getSizeType(container.second, returnArg);
|
2022-12-19 14:37:51 +00:00
|
|
|
}
|
|
|
|
"""
|