Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 31,429 of 33,346    |
|    Dave Abrahams to All    |
|    Re: question: shared pointers with custo    |
|    29 Aug 11 05:31:21    |
   
   beb187d9   
   From: dave@boostpro.com   
      
   on Sun Aug 28 2011, Andrew wrote:   
      
   > However, I am getting a massive compilation error message during the   
   > parsing of some custom deleter header file that is getting pulled in   
   > somehow. The error message makes me think that the use of a custom   
   > deleter requires that the type be fully known. The error message   
   > includes this:   
   >   
   > /usr/local/boost/include/boost/checked_delete.hpp:32: error: invalid   
   > application of 'sizeof' to incomplete type 'uuid_t'   
   >   
   > I know this is boost but surely the same applies for the equivalent   
   > smart pointers in TR1.   
   >   
   > Can anyone comment on this please?   
      
   This usually means that the place where the destructor of the smart   
   pointer is executed can't see the definition of the pointee class.   
   Boost/tr1's shared_ptr will let you do this without exposing the pointee   
   class definition at the point of destruction. However, it strikes me   
   that if you're using smart pointers to implement a UUID class there may   
   be something wrong with your design. UUIDs seem like classic value   
   types to me.   
      
   --   
   Dave Abrahams   
   BoostPro Computing   
   http://www.boostpro.com   
      
      
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
    [ comp.lang.c++.moderated. First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca