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
494 stars 40 forks source link

Add span_FEATURE_MAKE_SPAN #33

Closed martinmoene closed 5 years ago

martinmoene commented 5 years ago

Add configuration flag span_FEATURE_MAKE_SPAN to unconditionally control presence of make_span()

Plan:

Originates from issue #32 .

Envisioned implementation:

#ifndef  span_FEATURE_MAKE_SPAN
#ifdef   span_FEATURE_MAKE_SPAN_TO_STD
# define span_FEATURE_MAKE_SPAN  span_IN_STD( span_FEATURE_MAKE_SPAN_TO_STD )
#else
# define span_FEATURE_MAKE_SPAN  0
#endif
#endif
Flamefire commented 5 years ago

Please do the same for all other *_TO_STD macros. Especially as e.g. the subspan function rely on this.