Closed tsung-wei-huang closed 4 years ago
@tsung-wei-huang, sorry for reacting only now,
span-lite provides as_bytes()
, as_writable_bytes()
and std::as_bytes()
, std::as_writable_bytes()
via namespace nonstd
.
So one can either use (example on Godbolt)
fun( span_lite::as_bytes( spn ) ); // explicitly specify namespace
or
using namespace nonstd;
fun( as_bytes( spn ) ); // make everything from nonstd available
or
fun( as_bytes( spn ) ); // ADL: argument-dependent lookup
Assuming this can be closed.
I think you should do this in order to enable as_bytes function to your byte-lite library?
The original code doesn't have
span_HAVE( NONSTD_BYTE )
and that causes me error in usingas_bytes
even thoughbite-lite
exists.