Using declaration not resolving
deadlocklogic opened this issue · 1 comments
deadlocklogic commented
Consider this:
cppast::cpp_entity_index _idx;
cppast::libclang_parser _parser;
cppast::libclang_compile_config _config;
auto _file = parse(_idx, "test", R"(
namespace cppast
{
class cpp_template
{
protected:
template <class T, class EntityT>
class basic_builder
{
public:
basic_builder() {}
basic_builder(basic_builder&&) = default;
};
};
/// A [cppast::cpp_entity]() modelling a function template.
class cpp_function_template final : public cpp_template
{
public:
class builder : public basic_builder<void, void>
{
public:
using basic_builder::basic_builder;
};
};
}
)", true);
cppast::visit(*_file, [&](const cppast::cpp_entity& e, cppast::visitor_info info) {
if (info.event != cppast::visitor_info::container_entity_exit) {
if (e.kind() == cppast::cpp_entity_kind::using_declaration_t) {
auto& target = dynamic_cast<const cppast::cpp_using_declaration&>(e).target();
if (target.no_overloaded().get() > 0) {
auto refs = target.get(_idx);
if (refs.size() > 0) {
auto ref = refs[0];
}
}
}
}
return true;
});
Using declaration using basic_builder::basic_builder;
is failing to resolve.
Possible bug, or limitation?