[cfe-commits] PATCH: Add VariadicFunction class template to LLVM's ADT

Douglas Gregor dgregor at apple.com
Fri Dec 16 07:51:19 PST 2011


On Dec 16, 2011, at 1:06 AM, Chandler Carruth wrote:

> Thanks for the review. I've committed the first version in r146729 so that fixes can happen in-tree. Almost all of your and David's feedback both here and on IRC has been addressed. Only one issue remains, and if you have ideas about how to solve it, I'll happily jump on that one.
> 
> On Thu, Dec 15, 2011 at 10:19 AM, Douglas Gregor <dgregor at apple.com> wrote:
> Just one comment:
> 
> +  VariadicFunction() {}
> +
> 
> This is not trivial, which is unfortunate. Please just leave out the default constructor so we'll get the implicitly-generated trivial default constructor. (The same goes for all of the VariadicFunction* class templates).
> 
> This sounds great, but it breaks declaring these as 'const'. It's really not clear to me why, but I may be having a dense moment here. Do you think its worth requiring these to be non-const to make the constructor trivial? Any other ideas of how to do this? I agree trivial would be much better here.

Why not something like 

	const VariadicFunction<blah> Foo = { };

?

	- Doug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111216/fd2beb85/attachment.html>


More information about the cfe-commits mailing list