C++ Logo

sg16

Advanced search

Re: [SG16-Unicode] Replacement for codecvt

From: Niall Douglas <s_sourceforge_at_[hidden]>
Date: Fri, 30 Aug 2019 15:05:19 +0100
On 29/08/2019 21:57, Steve Downey wrote:
> It's not out of the question that span may acquire contiguous_range
> constructors for 20. That changes the picture in 2 dimensions. First it
> ties span with the machinery the Niall was trying to avoid.

I don't see the hard dependence on Ranges for that.

ContiguousRange could be defined in a way not requiring the include of
<ranges>, for example.

Even better is if span can examine what you're feeding it for
contiguousness, and accept anything meeting that.

The alternative is that people simply don't use <span>, and use one of
the many third party span implementations which are guaranteed lightweight.

This is already a significant proportion of the C++ userbase,
incidentally. People used to avoid the standard library for stuff like
deque back in C++ 98, but the subset of the standard library being
avoided grows incessantly. Some of that is on the standard library
implementers, but a lot of it is on WG21 not caring much about build
time impact. For example, <system_error> includes <string>, and so
std::error_code is unusable. <optional> includes <stdexcept>, and thus
<string>, so everybody uses a third party Optional. All that was very
avoidable if WG21 had been just a little more orthogonal when choosing
header dependencies.

Niall

Received on 2019-08-30 16:05:22