https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116399

--- Comment #10 from 康桓瑋 <hewillk at gmail dot com> ---
(In reply to Jonathan Wakely from comment #9)
> Currently aliases_view is allowed to be a common range, but not required to
> be.
> 
> If we specify that its sentinel type is std::default_sentinel, that would
> require it to be a non-common range. Why would we want that?
> 
> If an implementation decides to use a different design for the aliases_view
> which is more efficient with a common range, your suggestion would forbid
> them from using that.
> 
> So I don't think we should require that. Whether libstdc++ should make that
> change is a different matter.
> 
> I guess we could also defined the sentinel as an enum type, which might be a
> little less expensive than a new class type. Or just use default_sentinel_t.

But we should at least make it clear in the standard whether aliases_view is
common range is *unspecified*, right?
Currently, the return type of begin()/end() is *implementation defined*, which
seems confusing because the two types appear to be the same as we indicated for
iterators in the [container], and containers are always common ranges.

Reply via email to