Thanks to visit codestin.com
Credit goes to github.com

Skip to content

declaration of 'last' hides global declaration #192

@johnco3

Description

@johnco3

I found the following warning in my windows build. Looks like it has not been addressed. I renamed the inner variable last something else to work around the issue. Note that the vcpkg port also has this issue and vcpkg is not using the latest magic_enum port.

link to vcpkg issue

9>C:\Users\johnc\main\tcdu\include\702\C702Words.h(450): message : see reference to function template instantiation 'std::optional<WordID> magic_enum::enum_cast<WordID>(unsigned int) noexcept' being compiled (compiling source file ..\..\src\702\C702Protocol.cpp)
9>C:\tools\vcpkg\installed\x64-windows\include\magic_enum.hpp(763,44): error C2220: the following warning is treated as an error (compiling source file ..\..\src\702\C702SubSystem.cpp)
9>C:\tools\vcpkg\installed\x64-windows\include\magic_enum.hpp(763,44): warning C4459: declaration of 'last' hides global declaration (compiling source file ..\..\src\702\C702SubSystem.cpp)
9>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\include\chrono(812,32): message : see declaration of 'std::chrono::last' (compiling source file ..\..\src\702\C702SubSystem.cpp)

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions