Skip to content

unqualid ignores dependent types/values and produce error #302

@DaemonSnake

Description

@DaemonSnake

Hi,
when using unqualid in a dependent scope, if some of its arguments are dependent
we expect the result to be a dependent name such as in:

template<class T>
void func()
{
    T::dependent_name();
    typename T::other_dependent;
    T::template templated_dependent<...>;
}

Instead, the dependency is ignored and we get an error before the template instantiation.

godbolt: https://cppx.godbolt.org/z/zd8Pc9naW

struct a0
{
   static consteval void fn() {}
};

template<int N>
consteval void func()
{
    unqualid("a", 0)::fn(); //ok
    unqualid("a", N)::fn(); //depedent value N ignored. "error: use of undeclared identifier '__identifier_splice'"
}

I believe this causes a number of silent errors too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions