Skip to content

wrong name of base class #473

@wangzimei

Description

@wangzimei

hi, this code

// https://stackoverflow.com/questions/9851594/standard-c11-way-to-remove-all-pointers-of-a-type

#include <type_traits>

template <typename T>
struct remove_all_pointers : std::conditional_t<
    std::is_pointer_v<T>,
    remove_all_pointers<std::remove_pointer_t<T>>,
    std::type_identity<T>
> {};

int main() {
    static_assert(std::is_same_v<int, remove_all_pointers<int *>::type>);
}

gets translated to

...

/* First instantiated from: insights.cpp:14 */
#ifdef INSIGHTS_USE_TEMPLATE
template<>
struct remove_all_pointers<int *> : public std::remove_all_pointers<int>
{
};

...

here std::remove_all_pointers<int> should in fact be remove_all_pointers<int>, it has no namespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions