Skip to content

C++14 support is not enabled with msvc2015 #1932

@Predelnik

Description

@Predelnik

_HAS_CXX14 is never defined by MSVC
Proof:
https://gcc.godbolt.org/z/5odXyR

Also you may check that Microsoft STL uses only _HAS_CXX17

So second half of check for C++14 version support is incorrect (never triggered):

#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1)

What it leads to - on older msvc's which was not defining __cplusplus properly (at least on msvc2015) C++14 is never treated as supported even though it is supported. Currently it only disables usage of transparent comparator.

Unfortunately it seems there is no correct way to check for C++14 support for msvc since lowest value of their language switch is also c++14 but more or less it was supported starting from VS2015 and since it is the lowest version library supports, maybe treating C++14 as always supported by msvc is the best option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: visual studiorelated to MSVCsolution: invalidthe issue is not related to the librarystate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions