|
Boost : |
From: David B. Held (dheld_at_[hidden])
Date: 2002-07-30 17:09:28
"Philippe A. Bouchard" <philippeb_at_[hidden]> wrote in message
news:ai6uui$gn1$1_at_main.gmane.org...
> [...]
> Well we could restrict assignments from whom offsets differ only. Here
> is a clumsy compile-time assertion example (I'm sure someone else can
> build one more cleanly):
> [...]
I have a name for your pointer: hack_ptr<>. ;)
Dave
P.S. Seriously, do you notice how you are constantly pressured into
making hacks so that your pointer behaves like most smart pointers?
Does that bother you at all? Soon, your header will be a laundry list
of reinterpret_cast<>s sprinkled with a few pointer operations. ;) And
notice that your "solution" doesn't restore missing functionality. Rather
it enforces the lack of functionality. Many people might question the
utility of a non-polymorphic pointer.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk