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

Fix undefined behavior (get is moved to magic_enum::containers) #316

Merged

Conversation

IvanArkhipov1999
Copy link
Contributor

In magic_enum std::get is extended https://github.com/Neargye/magic_enum/blob/master/include/magic_enum/magic_enum_containers.hpp#L1130. But с++ documentation states, that "It is undefined behavior to declare a full specialization of any standard library function template." (https://en.cppreference.com/w/cpp/language/extending_std section "Function templates and member functions of templates").

So, get is moved to magic_enum::containers.

Closes #315

@Neargye Neargye added this to the v0.9.5 milestone Nov 15, 2023
@Neargye Neargye merged commit 56dcb01 into Neargye:master Nov 15, 2023
18 checks passed
@Neargye
Copy link
Owner

Neargye commented Nov 15, 2023

Thanks!

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

Successfully merging this pull request may close these issues.

Undefined behavior
2 participants