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.
MatrixRow-iterator-post-incr-decr.patch
Description: MatrixRow-iterator-post-incr-decr.patch
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel