geometry icon indicating copy to clipboard operation
geometry copied to clipboard

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

Open yoavmil opened this issue 2 years ago • 0 comments

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

yoavmil avatar Nov 06 '23 08:11 yoavmil