magic_enum icon indicating copy to clipboard operation
magic_enum copied to clipboard

VS2022 IntelliSence Error E0095

Open twoone-3 opened this issue 1 year ago • 6 comments

E0095 Array is too large
 magic_enum\magic_enum.hpp 198
 in class "magic_enum::detail: :static_string<N> [where N=18446744073709551600Ui64]"
 on line:341 Detected during instantiation

When I compile the project with VS2022, the compiler reports this error, my compiler option is C++17, but it compiles and runs without problems, I hope you can check the reason.

twoone-3 avatar Jul 10 '22 04:07 twoone-3

It's looks like VS problem https://github.com/Neargye/magic_enum/issues/122 I don't know how to fix this inside library/

Neargye avatar Jul 12 '22 12:07 Neargye

but, from #122 I know that he can add static_assert to fix this problem. Why do you say you do not know it?

twoone-3 avatar Jul 12 '22 12:07 twoone-3

see https://github.com/Neargye/magic_enum/pull/125

Neargye avatar Jul 12 '22 12:07 Neargye

Is there a workaround for now, because commenting out the header to get intellisense is very frustrating.

doodlum avatar Aug 05 '22 10:08 doodlum

@doodlum @twoone-3 test master, please

Neargye avatar Aug 05 '22 11:08 Neargye

The error is still exist, line 198

twoone-3 avatar Aug 07 '22 09:08 twoone-3

I tried something else fix in master, but honestly ran out of ideas.

Neargye avatar Aug 08 '22 10:08 Neargye

Did it help in any way?

Neargye avatar Aug 14 '22 19:08 Neargye

I haven't tested it yet, I'll try it now

twoone-3 avatar Aug 15 '22 00:08 twoone-3

It work! Thank you!

twoone-3 avatar Aug 15 '22 00:08 twoone-3