|
#ifdef TCB_SPAN_HAVE_STD_BYTE |
|
using byte = std::byte; |
|
#else |
|
using byte = unsigned char; |
|
#endif |
The implementation has some usings that put reduced names in enclosing namespace scope. If a user #defines TCB_SPAN_NAMESPACE_NAME to their own, this can have undesired consequences.
A different solution that avoids header pollution - to not define namespace name and use an alias like mylib::span = tcb::span does not really work because there is more than just a span class template, including non-member functions that are rather complex to alias.
I propose to move these usings to some internal namespace, eg TCB_SPAN_NAMESPACE_NAME::detail.
span/include/tcb/span.hpp
Lines 133 to 137 in 5d8d366
The implementation has some usings that put reduced names in enclosing namespace scope. If a user
#definesTCB_SPAN_NAMESPACE_NAMEto their own, this can have undesired consequences.A different solution that avoids header pollution - to not define namespace name and use an alias like
mylib::span = tcb::spandoes not really work because there is more than just a span class template, including non-member functions that are rather complex to alias.I propose to move these usings to some internal namespace, eg
TCB_SPAN_NAMESPACE_NAME::detail.