Add is_templated() helper

This commit is contained in:
Jonathan Müller 2017-03-27 21:47:57 +02:00
commit 67f247533c
6 changed files with 26 additions and 4 deletions

View file

@ -54,6 +54,8 @@ d::d(const int&);
cpp_entity_index idx;
auto file = parse(idx, "cpp_function_template.cpp", code);
auto count = test_visit<cpp_function_template>(*file, [&](const cpp_function_template& tfunc) {
REQUIRE(is_templated(tfunc.function()));
if (tfunc.name() == "a")
{
check_template_parameters(tfunc, {{cpp_entity_kind::template_type_parameter_t, "T"}});