Skip to content

MSVC 2022 warning about stdfloat not available till c++23 #1213

@yoavmil

Description

@yoavmil

I get a compiler warning when including <boost/geometry.hpp>, because it includes <promotion.hpp> which includes <stdfloat>

#if __has_include(<stdfloat>) // this resolves to true somehow
#  include <stdfloat>
#endif
// at stdfloat
#if !_HAS_CXX23
_EMIT_STL_WARNING(STL4038, "The contents of <stdfloat> are available only with C++23 or later.");
#else // ^^^ !_HAS_CXX23 / _HAS_CXX23 vvv

may be replace #if __has_include(<stdfloat>) with #if __has_include(<stdfloat>) & _HAS_CXX23

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions