|
Boost Users : |
From: Sohail Somani (sohail_at_[hidden])
Date: 2007-12-02 20:02:35
On Sun, 02 Dec 2007 01:33:49 +0100, Stathis wrote:
> which works, but if I change:
> std::list<B *> stuff; // in class A
> to
> std::list<int *> stuff;
>
> it fails to compile.
>
> Can you explain what is wrong with my intended use case and if possible
> how to do it properly? Thank you for the help.
Hi.
This is why I suggested you use BOOST_STRONG_TYPEDEF. What you have done
with class B is essentially what BOOST_STRONG_TYPEDEF would do. So try
doing BOOST_STRONG_TYPEDEF(int,trackable_int) and use a list of *these*
objects.
Another option is to specialize some trait whose name escapes me.
Good luck!
-- Sohail Somani http://uint32t.blogspot.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net