List:MySQL++« Previous MessageNext Message »
From:Jonathan Wakely Date:June 15 2009 8:09pm
Subject:Re: Why dynamic allocation for Option objects?
View as plain text  
2009/6/15 Kevin Regan:
> Thanks again Jonathan.  I'm happy as long as the type_info object doesn't go out of
> scope when the object is deleted.

yep, that's fine.

> By the way, can you point me to where this is covered in the C++ spec?  I'm not an
> expert, but I do like to fill in my knowledge gaps whenever I get the chance. :-)

5.2.8 [expr.typeid] paragraph 1 covers the lifetime.  The standard
doesn't have anything to say about shared libraries, but it doesn't
specifically say that type_info objects returned by typeid must be
unique.  In the GCC implementation on GNU/Linux you can get distinct
objects with the same value by using typeid in shared libraries.

Jonathan
Thread
Why dynamic allocation for Option objects?Kevin Regan6 Jun
  • Re: Why dynamic allocation for Option objects?Warren Young6 Jun
    • RE: Why dynamic allocation for Option objects?Kevin Regan11 Jun
      • Re: Why dynamic allocation for Option objects?Jonathan Wakely11 Jun
        • RE: Why dynamic allocation for Option objects?Kevin Regan13 Jun
          • RE: Why dynamic allocation for Option objects?Kevin Regan13 Jun
          • Re: Why dynamic allocation for Option objects?Jonathan Wakely13 Jun
            • RE: Why dynamic allocation for Option objects?Kevin Regan14 Jun
              • Re: Why dynamic allocation for Option objects?Jonathan Wakely14 Jun
                • RE: Why dynamic allocation for Option objects?Kevin Regan14 Jun
                  • Re: Why dynamic allocation for Option objects?Jonathan Wakely15 Jun
                    • RE: Why dynamic allocation for Option objects?Kevin Regan15 Jun
                      • Re: Why dynamic allocation for Option objects?Jonathan Wakely15 Jun
              • Re: Why dynamic allocation for Option objects?Warren Young16 Jun
        • Re: Why dynamic allocation for Option objects?Warren Young16 Jun