[boost] boost::any question
by Trey Jackson other posts by this author
Jun 8 2004 12:01AM messages near this date
[boost] Re: Thread lib (good reason for static)
|
[boost] Re: boost::any question
All,
I just started looking at boost::any, pretty nice. I looked at the
implementation, and it uses (as you know) a pointer to an object
(w/virtual methods) on the heap, and typeid to determine if conversion is
possible.
I understand the memory implications (a new object copied on heap).
But I'd like to get a better handle on performance, namely:
I'm unfamiliar with typeid - and how it's implemented.
Does anyone have good pointers to how typeid is generally implemented?
Or even specifically: I'm using gcc3.x on RH Linux.
I'd just like to avoid/guarantee I'm not going to be hit by some O(N)
look-up for using typeid a lot.
thanks,
TJ
--
Trey Jackson
tjackson@[...].com
"Her hair glistened in the rain like nose hair after a sneeze."
-- Chuck Smith, Woodbridge
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Trey Jackson
Maxim Yegorushkin
Doug Gregor
|