Hi,
I was reading through <poly.hpp> source on ASL web [1].
1. There are wrong comments on lines 128, 170 - they accompany friend function, but mention "this": "// Precondition : this->type_info() == x.type_info()" --> solution: "this" should be "x" and "x" should be "y" (this comment was probably simply copy/pasted from above cases, where it is correct)
2. For the 2 functions mentioned above and other ones where there is a comment about a precondition - why not add an "assert(this->type_info() == x.type_info());" to the code? (I am still trying to figure the code out, but asserting preconditions looks like the right thing to do in debug builds).
Thanks,
Boris
Thanks for the report. I submitted a fix. If you are interested in learning more about poly.hpp's implementation, there is a paper describing a slightly older version at http://www.emarcus.org/#mpool_2007
Good to hear about the fix and thanks for the link to the paper which I will be sure to read.