r175580 - Allow llvm::Optional to work with types without default	constructors.
    David Blaikie 
    dblaikie at gmail.com
       
    Tue Feb 19 18:20:00 PST 2013
    
    
  
On Tue, Feb 19, 2013 at 6:15 PM, Jordan Rose <jordan_rose at apple.com> wrote:
> This is awesome. I think you need to write a move constructor now too,
> though—otherwise you'll end up with two complete objects being destructed.
> (Consider Optional<std::string>.)
>
I don't think I /need/ to write a move ctor, in the sense that the type
won't get one for free (the conditions under which an implicit move ctor is
provided are vanishingly rare) but it'd certainly be nice to have one.
> Also, at least in we've been trending towards lowercase method names for
> new methods (i.e. reset() instead of Reset()). Is that not the case in LLVM?
>
No, seems you're right - even within the Optional class itself (getPointer,
etc) - my mistake. Will fix.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130219/622243b6/attachment.html>
    
    
More information about the llvm-commits
mailing list