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

Define missing macros span_HAVE_INLINE_NAMESPACE and span_CONFIG_CONTRACT_VIOLATION_THROWS_V #24

Closed feroldi closed 6 years ago

feroldi commented 6 years ago

GCC (under -Werror=undef) whines about span_HAVE_INLINE_NAMESPACE and span_CONFIG_CONTRACT_VIOLATION_THROWS_V macros not being defined. The former one was actually missing a proper definition (C++11 and MSVC 14.0 have inline namespaces). The latter was a misuse: checking for an undefined macro's value.

I made the changes myself, but I'm not sure whether I should PR this.

martinmoene commented 6 years ago

Thanks @feroldi , I took care of it in the two commits mentioned above.

feroldi commented 6 years ago

Thanks!