Я включаю только один раз во всю свою кодовую базу, внутри моего предварительно скомпилированного заголовка. Я выполняю включение в начало моего файла вместе с другими стандартными библиотеками, включая:
Код: Выделить всё
#pragma warning(push)
#pragma warning(disable: 26498)
#pragma warning(disable: 26800)
#pragma warning(disable: 26495)
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#pragma warning(pop)
Как мне избавиться от этих предупреждений?
Я использую MSVC и Visual Studio 2026
Вот ссылка на мой репозиторий, приведенный выше фрагмент кода находится по адресу
Код: Выделить всё
\AstralEngine\src\Common.hhttps://github.com/yaBoiSamy/AstralEngi ... src/Astral
На всякий случай, вот расшифровка предупреждений:
Код: Выделить всё
Warning C26498 The function 'fmt::v12::detail::exponent_mask' is constexpr, mark variable 'mask' constexpr if compile-time evaluation is desired (con.5). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\fmt\bundled\format.h 3507
Warning C26498 The function 'fmt::v12::detail::exponent_mask' is constexpr, mark variable 'mask' constexpr if compile-time evaluation is desired (con.5). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\fmt\bundled\format.h 3507
Warning C26498 The function 'fmt::v12::detail::num_bits' is constexpr, mark variable 'shift' constexpr if compile-time evaluation is desired (con.5). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\fmt\bundled\format.h 2720
Warning C26498 The function 'fmt::v12::detail::num_significand_bits' is constexpr, mark variable 'num_float_significand_bits' constexpr if compile-time evaluation is desired (con.5). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\fmt\bundled\format.h 1584
Warning C26498 The function 'fmt::v12::detail::num_significand_bits' is constexpr, mark variable 'num_float_significand_bits' constexpr if compile-time evaluation is desired (con.5). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\fmt\bundled\format.h 3060
Warning C26498 The function 'fmt::v12::detail::num_significand_bits' is constexpr, mark variable 'significand_mask' constexpr if compile-time evaluation is desired (con.5). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\fmt\bundled\format-inl.h 1266
Warning C26498 The function 'fmt::v12::detail::num_significand_bits' is constexpr, mark variable 'significand_mask' constexpr if compile-time evaluation is desired (con.5). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\fmt\bundled\format.h 3184
Warning C26498 The function 'fmt::v12::detail::num_significand_bits' is constexpr, mark variable 'num_float_significand_bits' constexpr if compile-time evaluation is desired (con.5). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\fmt\bundled\format.h 1584
Warning C26498 The function 'fmt::v12::detail::num_significand_bits' is constexpr, mark variable 'significand_mask' constexpr if compile-time evaluation is desired (con.5). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\fmt\bundled\format-inl.h 1266
Warning C26800 Use of a moved from object: ''user_chars'' (lifetime.1). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\pattern_formatter-inl.h 1339
Warning C26495 Variable 'fmt::v12::writer::file_' is uninitialized. Always initialize a member variable (type.6). AstralEngine C:\Users\sampr\coding\AstralEngine\AstralEngine\vendors\spdlog\include\spdlog\fmt\bundled\format.h 940

Подробнее здесь: https://stackoverflow.com/questions/798 ... rning-list
Мобильная версия