This is causing me considerable headaches as I try to write my own ranges that accept other ranges and have it all work for the general case. Any advice would be welcome.
Why in Phobos is empty() sometimes const and sometimes not
Matt via Digitalmars-d-learn Mon, 29 Jul 2019 10:35:42 -0700
I've noticed that for some ranges in Phobos empty is marked const
(e.g. iota) but for other ranges (e.g. multiwayMerge) it is not
const. Is there a reason why? Isn't empty guaranteed not to alter
the data of the range and so should be const?
- Why in Phobos is empty() sometime... Matt via Digitalmars-d-learn
- Re: Why in Phobos is empty()... Eduard Staniloiu via Digitalmars-d-learn
- Re: Why in Phobos is empty()... H. S. Teoh via Digitalmars-d-learn
- Re: Why in Phobos is emp... Jonathan M Davis via Digitalmars-d-learn
- Re: Why in Phobos is empty()... Jonathan M Davis via Digitalmars-d-learn
- Re: Why in Phobos is empty()... ag0aep6g via Digitalmars-d-learn
- Re: Why in Phobos is empty()... Matt via Digitalmars-d-learn
- Re: Why in Phobos is emp... Jonathan M Davis via Digitalmars-d-learn
- Re: Why in Phobos is emp... Matt via Digitalmars-d-learn