[LLVMdev] Using C++'11 language features in LLVM itself

Óscar Fuentes ofv at wanadoo.es
Wed Jan 9 08:58:59 PST 2013

Chandler Carruth <chandlerc at google.com> writes:

>> > variadic templates
>> Irrelevant. The LLVM project discourages any non-trivial use of
>> templates.
> I'm not sure why you say this.
> We have a fake form of variadic templates because we wanted them so badly.

Then, the policy changed. (maybe at some point on the last five

> We have many non-trivial templates where they make sense and provide
> value... I mean, we certainly avoid them when not appropriate or when
> ethere are other, simpler solutions... :: shrug ::
> On the other hand, there are trivial uses of variadic templates too, so I
> think we could still make the argument that they're handy to have.

I'm on the process of converting a code base that extensively uses
BOOST_PP to variadic templates... so much fun and so much pain.
Certainly, there are cases which are easy and useful, but most
applications of variadic templates require a functional programming
mindset plus the skills and knowledge to put it to work in the context
of the C++ language. Which means lots of pitfalls. Too much to ask to
the typical LLVM contributor (Clang developers are a different kind of
fauna, though.)

BTW, variadic templates support is not on VS 2012 either. There is a
techonology preview out there, but in a too immature and buggy state to
use it on anything half serious.

More information about the llvm-dev mailing list