Opened 8 years ago

Last modified 7 years ago

#10762 new Bugs

fixed_matrix &operator = (matrix m) wrong parameter

Reported by: anonymous Owned by: Douglas Gregor
Milestone: To Be Determined Component: numeric
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

Software was not tested! Error in C:\Boost\include\boost-1_57\boost\numeric\ublas\matrix.hpp line 1387 fixed_matrix &operator = (matrix m) {.. is wrong. Correct is: fixed_matrix &operator = (fixed_matrix m) {

Attachments (1)

0001-Fix-typo-in-fixed_matrix-move-assignment.patch (1.4 KB ) - added by James Benze 8 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by James Benze, 8 years ago

Can confirm, I'm experiencing this issue as well.

comment:2 by James Benze, 8 years ago

Problem is fixed by changing

fixed_matrix & operator=(matrix m)

to

fixed_matrix & operator=(fixed_matrix m)

Although based on the comment that this is supposed to be a move-assignment operator, the author probably really wants

fixed_matrix & operator=(fixed_matrix && m)

Otherwise...well I'm not sure how that would overload with the copy-assignment operator. Probably not nicely.

Gimmie a few minutes and I'll generate up a patch.

comment:3 by James Benze, 8 years ago

Sorry for the delay, I didn't realize boost had completed the migration to git...I was bumming around the svn server, trying to figure out where all the commits went.

I made a pull request and committed it to the ublas repository...I can't link it because I guess trac doesn't let people without IDs like myself send external links, but it's pull request number 15.

comment:4 by James Benze, 8 years ago

And there's a patch version of the pull request as well, just for completeness :-)

comment:5 by James Benze <benzejaa@…>, 7 years ago

Patch has been accepted and the bug is fixed in the development version. This bug can be closed by someone that has the ability to close tickets.

Note: See TracTickets for help on using tickets.