Skip to content

Conversation

@banderzhm
Copy link

  • Add explicit str() method to static_str for explicit string_view conversion
  • Conditionally disable implicit operator string_view() in MSVC module mode
  • Non-module builds and other compilers remain unaffected

…ator

- Add explicit str() method to static_str for explicit string_view conversion
- Conditionally disable implicit operator string_view() in MSVC module mode
- This resolves C2833 error when using MAGIC_ENUM_USE_STD_MODULE with MSVC
- Non-module builds and other compilers remain unaffected
@ZXShady
Copy link
Contributor

ZXShady commented Oct 17, 2025

is static_str a public type? It shouldn't be and I think we should drop the conversion operator

@banderzhm
Copy link
Author

Clang and MSVC behave completely differently.This is the best solution I could think of.

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.

2 participants