[Rcpp-devel] Patch: MatrixRow::iterator post-incr and -decr

North, Ben Ben.North at sig.com
Fri Feb 1 11:44:21 CET 2013


Hi,

I was having trouble iterating through the elements of a MatrixRow, and
tracked it down to the following, which I think is a bug in Rcpp.

The post-increment and post-decrement operators within
MatrixRow::iterator currently return the new state of the iterator,
whereas they should return the original state.  The attached patch
(against 0.10.2, including new unit test) fixes this for me.

Could somebody review and apply if approved please?

Thanks very much, and for the continuing work on Rcpp --- it's a great
tool.

Ben.

________________________________

Susquehanna International Group Limited

Susquehanna International Group Limited is a private company limited by shares and registered in Ireland. Registration No.: 445356. Registered Address: 4th Floor, Georges Dock House, IFSC, Dublin 1, Ireland.
Susquehanna Ireland Limited is a private company limited by shares and registered in Ireland. Registration No.: 305632. Registered Address: 4th Floor, Georges Dock House, IFSC, Dublin 1, Ireland.
Susquehanna International Securities Limited is a private company limited by shares and registered in Ireland. Registration No.: 337946. Registered Address: 4th Floor, Georges Dock House, IFSC, Dublin 1, Ireland.

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MatrixRow-iterator-post-incr-decr.patch
Type: application/octet-stream
Size: 3125 bytes
Desc: MatrixRow-iterator-post-incr-decr.patch
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130201/f3d3f3b9/attachment.obj>


More information about the Rcpp-devel mailing list