Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MSVC C++ 20 compiler issue #7

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

elvisdukaj
Copy link
Contributor

HI! It seems that the build is broken with the latest visual c++ compiler when enabling C++20.

What is the error log

C:\Users\edukaj\.conan2\p\b\freei373179c09645a\b\src\Source\MapIntrospector.h(98,36): error C2065: '_Node': undeclared identifier [C:\Users\edukaj\
.conan2\p\b\freei373179c09645a\b\build\FreeImage.vcxproj]
  ConversionRGBF.cpp
  (compiling source file '../src/Source/FreeImage/BitmapAccess.cpp')
  C:\Users\edukaj\.conan2\p\b\freei373179c09645a\b\src\Source\MapIntrospector.h(98,36):
  the template instantiation context (the oldest one first) is
        C:\Users\edukaj\.conan2\p\b\freei373179c09645a\b\src\Source\MapIntrospector.h(95,7):
        while compiling class template 'MapIntrospector'

C:\Users\edukaj\.conan2\p\b\freei373179c09645a\b\src\Source\MapIntrospector.h(98,36): error C3861: '_Node': identifier not found [C:\Users\edukaj\.
conan2\p\b\freei373179c09645a\b\build\FreeImage.vcxproj]
  (compiling source file '../src/Source/FreeImage/BitmapAccess.cpp')

What is my setup:

[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows

How can I reproduce it?

Simply use Visual C++ with C++20 enabled and start the build.

What is wrong?

FreeImage needs to understand the footprint of the map to understand the size of a bitmap. In the following line of code MapIntrospector derives from std::map but the field _Node seems not anymore exposed when building with C++20,

@tbeu
Copy link
Contributor

tbeu commented Mar 20, 2024

There now is #8 demonstrating the necessity of this fix.

@tbeu
Copy link
Contributor

tbeu commented Mar 20, 2024

Note, that also #9 is required for a successful CI build with tests on MSVC C++20.

Copy link
Contributor

@tbeu tbeu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elvisdukaj
Copy link
Contributor Author

Any plan on when these PR will get merged?

Copy link
Owner

@danoli3 danoli3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! Fixes it for me!

@danoli3 danoli3 merged commit 6175853 into danoli3:master Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants