ukoethe / vigra

a generic C++ library for image analysis
http://ukoethe.github.io/vigra/
Other
410 stars 191 forks source link

Forward decls in multi_handle.hxx #533

Open mkrausex opened 1 year ago

mkrausex commented 1 year ago

There are two forward decls at the beginning of multi_handle.hxx which, according to a comment there, “Visual Studio doesn't like”, and are currently disabled via #ifndef _MSC_VER. However, Visual Studio 2019 in C++20 mode actually seems to expect these forward decls – the code compiles only if I enable them (i.e., when I remove the #ifndef _MSC_VER).

What would be a good solution? I guess that for some older version of Visual Studio, these forward decls had really been a problem originally. Maybe we should only keep them disabled for all Visual Studio versions before 2019, and enable them for 2019 and later? Or should it be conditional on the C++ standard version instead?

hmaarrfk commented 1 year ago

I'm happy to be a little more agressive with the visual studio versions to help modernize the build.

Now that we have the CIs running, we can make a few CIs with different compiler versions.

mkrausex commented 11 months ago

Do I understand you correctly that you are in favor of enabling these forward decls unconditionally - and accepting compilation problems on old Visual Studio versions? If yes, I can prepare a PR.

hmaarrfk commented 11 months ago

yes