[MultiArray] Postcondition of assignment
Hi list,
I see in the MultiArray concept documentation that the operator= has the
postcondition (*.this) == x;
But if I use overlapping memory this postcondition does not hold.
The attached program asserts trying to verify the postcondition. In this
program I have a 2D square matrix represented as a multi_array. I then
assign column j to row i. Depending on the relationship of i and j and how
the implementation of operator= does the traversal over the elements to be
copied, the program may not satisfy the mentioned postcondition.
May I suggest some note in the documentation about this.
Is it possible that the traversal can be done forward or backward to
guarantee the said postcondition even in the face of overlapping memory?
Thanks.
PS: Maybe I'm just using multi_array incorrectly. It that's the case, please
do help me to use it correctly.
#include
Similiar question, potentially helpful: http://groups.google.com/group/boost-list/browse_thread/thread/1c241e686270c... http://groups.google.com/group/boost-list/browse_thread/thread/a1ffed2947c488e8/d38d4fe3a114474a?lnk=gst&q=[multi_array]#d38d4fe3a114474a http://groups.google.com/group/boost-list/browse_thread/thread/36ee91a579483e3/a8dcfa4022b6b8a3?lnk=gst&q=[multi_array]#a8dcfa4022b6b8a3
PS: Maybe I'm just using multi_array incorrectly. It that's the case, please do help me to use it correctly.
You're not the only one in this situation!
gtsml owevwr
Similiar question, potentially helpful: http://groups.google.com/group/boost-list/browse_thread/thread/1c241e686270c...
PS: Maybe I'm just using multi_array incorrectly. It that's the case, please
do help me to use it correctly.
You're not the only one in this situation!
Thanks for the links!
participants (3)
-
dariomt
-
dariomt@gmail.com
-
gtsml owevwr