Replies: 1 comment
-
But I looked at the definition and it was initialized. Is this a BUG in MSVC? data m_data = {}; https://github.com/nlohmann/json/blob/620034e/include/nlohmann/json.hpp#L4221 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was using the MSVC toolchain and CMake on windows when I got a C26495 warning telling me that
m_data
was uninitialized.https://github.com/nlohmann/json/blob/620034e/include/nlohmann/json.hpp#L1142
Testing other compilers does not have this problem.
code:
https://godbolt.org/z/WTb78WvaW
CMakeList.txt:
Image:
Beta Was this translation helpful? Give feedback.
All reactions