Skip to content

We should enforce /Zc:__cplusplus by default in our CMake basic target #42

Description

@saki7

Currently, our detection of the forward declaration of std::hash is broken because MSVC sets __cplusplus to 199711L by default. This is a well-known long-standing burden in MSVC which I think should be fixed in our _iris_cxx_common target.

#if __cplusplus <= 202302L || \
(defined(_MSVC_STL_UPDATE) && _MSVC_STL_UPDATE < 202504L) || \
(defined(__GLIBCXX__) && __GLIBCXX__ < 20241201) || \
(defined(_LIBCPP_STD_VER) && _LIBCPP_STD_VER < 26)
# include <typeindex> // pre-C++26
#else
# include <utility> // C++26 and later
#endif

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIBuild system issuesgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions