By singleton, I meant that each type only had a single type_info object that is returned
for all objects of that type.
Thank you for confirming that, though. :-)
From: jonathan.wakely@stripped [jonathan.wakely@stripped] On Behalf Of Jonathan Wakely
Sent: Sunday, June 14, 2009 5:58 AM
To: Kevin Regan
Subject: Re: Why dynamic allocation for Option objects?
2009/6/14 Kevin Regan:
> The change below seems to fix this. I believe that the type_info object returned is
> a singleton that outlives the object, but I'm not 100% sure of that. Can some C++ expert
> confirm this?
It's not a singleton - you can have any number of instances of the
type, with different values. Otherwise every use of the typeid
operator would return the same result!
But the lifetime of the type_info object will last until the end of
the program, so your change is safe in that respect.
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsub=1