object-introspection/types/pair_type.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
566 B
TOML
Raw Normal View History

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