hanickadot / compile-time-regular-expressions

Compile Time Regular Expression in C++
https://twitter.com/hankadusikova
Apache License 2.0
3.22k stars 177 forks source link

I know this is an old thread, but chiming in here - because _MSC_VER is defined when clang is building in msvc compatibility mode (via clang-cl), the addition of the changes in 957291343c16aa5d1ef3c54d024957f7316b110f to add `[[msvc::flatten]]` raises the diagnostic `-Wunknown-attributes` on clang-cl builds: #279

Open hanickadot opened 1 year ago

hanickadot commented 1 year ago
          I know this is an old thread, but chiming in here - because _MSC_VER is defined when clang is building in msvc compatibility mode (via clang-cl), the addition of the changes in 957291343c16aa5d1ef3c54d024957f7316b110f to add `[[msvc::flatten]]` raises the diagnostic `-Wunknown-attributes` on clang-cl builds:
ctre\ctre.hpp(5598,37): fatal error: unknown attribute 'flatten' ignored [-Wunknown-attributes]
template <ctll::fixed_string input> CTRE_FLATTEN constexpr CTRE_FORCE_INLINE auto operator""_ctre() noexcept {
                                    ^~~~~~~~~~~~
ctre\ctre.hpp(1409,24): note: expanded from macro 'CTRE_FLATTEN'
#define CTRE_FLATTEN [[msvc::flatten]]

Originally posted by @remyjette in https://github.com/hanickadot/compile-time-regular-expressions/issues/172#issuecomment-1498048013