opApply with/without ref

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Jan 13 07:11:31 PST 2012


On Fri, Jan 13, 2012 at 07:36:40AM -0500, bearophile wrote:
> H. S. Teoh:
> 
> > 	void opApply(int delegate(ref uint n) cb) const {
> 
> Use "const ref":
> > 	void opApply(int delegate(const ref uint n) cb) const {
[...]

Thanks a lot! That works like a charm!


T

-- 
Let's not fight disease by killing the patient. -- Sean 'Shaleh' Perry


More information about the Digitalmars-d-learn mailing list