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

Avoid different closure type visualized as same with some compiler. #9

Closed
Adttil opened this issue Jan 4, 2024 · 1 comment
Closed

Comments

@Adttil
Copy link
Contributor

Adttil commented Jan 4, 2024

QCIZ9JO YT8L38(V(N88SXG
In clang, this two types visualized as same becouse they contain closure types which generate at the same location. the picture below shows that in msvc the closure type has unique id.
DII 4PY$@ZVXRQ2VXW9DE{6

@Adttil Adttil changed the title different closure type visualized as same with some compiler. Avoid different closure type visualized as same with some compiler. Jan 4, 2024
@16bit-ykiko
Copy link
Owner

this have been resolved by unify the representation of lambda type

Now, the lambda type has a uniform representation across different compilers, and every lambda type will be given a unique ID. For example, the code below:

template <auto V>
struct Test{};

int main()
{
    std::cout << magic::visualize<Test<[]{}>>() << std::endl;
    std::cout << magic::visualize<Test<[]{}>>() << std::endl;
}

the output just like:
lambda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants