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

-Wundef when building with g++ -std=c++20 #84

Closed simark closed 7 months ago

simark commented 7 months ago

Using master as of today, I get:

$ g++ -x c++-header span.hpp -Wundef -Werror -std=c++20 
span.hpp:43:33: error: "span_HAVE_STRUCT_BINDING" is not defined, evaluates to 0 [-Werror=undef]
   43 | #define span_HAVE( feature )  ( span_HAVE_##feature )
      |                                 ^~~~~~~~~~
span.hpp:1873:5: note: in expansion of macro ‘span_HAVE’
 1873 | #if span_HAVE( STRUCT_BINDING )
      |     ^~~~~~~~~
cc1plus: all warnings being treated as errors