Boost logo

Boost :

From: Greg Colvin (Gregory.Colvin_at_[hidden])
Date: 2002-08-09 00:45:02

At 09:53 PM 08/08/2002, you wrote:
>> Say what?
>> You can define only one instance of a static member per class.
>This is exactly want I want: a unique id for each ptr<T> generated. ptr<X>
>and ptr<Y> are not the same class.

Then why did you claim that "the information will be specific
to each .cpp source file since static members are declared in
the header" and that the "size of s_rectify ... is directly
proportional to the number of static_cast<> combinations the
.cpp file will need" ?

As far as I can tell your program will violate the one
definition rule. And if you fix that the size of ptr s_rectify
will be proportional to the largest id needed in any source. I
suspect you are trying to take advantage of the ODR not being
enforced on your program. Or maybe it's just because your
test program is only one file that it seems to work

>> Of managing memory so that given a pointer to the interior
>> of an object you can recover a header associated with that
>> object. For example,
>It seems copyrighted under their terms and should create a little overhead logicaly speaking.

I mentioned it as a source of ideas, not as code that you could
use as is. I am convinced that you can make a smart pointer
with the properties you describe, but not the way you are trying
to do it.

Boost list run by bdawes at, gregod at, cpdaniel at, john at