martinmoene / span-lite

span lite - A C++20-like span for C++98, C++11 and later in a single-file header-only library
Boost Software License 1.0
499 stars 43 forks source link

"error: function-like macro 'span_HAVE' is not defined" when std::span is available #58

Closed burnpanck closed 3 years ago

burnpanck commented 4 years ago

On LLVM 10, I get the above error from "include/nonstd/span.hpp:1524:61":

#if span_CPP11_OR_GREATER && span_FEATURE( BYTE_SPAN ) && ( span_HAVE( BYTE ) || span_HAVE( NONSTD_BYTE ) )

It seem that, span_HAVE(...) is only defined when span_USES_STD_SPAN is false, but used outside of that configuration too.

gracicot commented 3 years ago

This also affect GCC11

martinmoene commented 3 years ago

Thanks for the heads-up.

This issue seems to be a duplicate of #55 and should have been closed already in April 2020 :)

span_HAVE() has been made available when using std::span in release 8.0 in issue #55 via bfee78b160e8e66503ac2d5be5e3de1d41291c08.