Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong name of base class #473

Closed
wangzimei opened this issue Jul 14, 2022 · 1 comment
Closed

wrong name of base class #473

wangzimei opened this issue Jul 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@wangzimei
Copy link

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.

@andreasfertig andreasfertig added the bug Something isn't working label Jul 15, 2022
@andreasfertig
Copy link
Owner

Hello @wangzimei,

thanks for catching that!

A fix is on its way.

Andreas

andreasfertig added a commit that referenced this issue Jul 15, 2022
Fixed #473: Use the correct namespace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants