diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-07 16:43:16 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-07 16:43:16 +0000 |
commit | f30101186f97f1edae855587ae64637e25a86811 (patch) | |
tree | 1f6205f7c57ae92e921fc1fcf59ad337f88769c6 /llvm/utils/TableGen/TGParser.cpp | |
parent | 1ec7ecce869c4e460a36719070a7f709373c6ab2 (diff) | |
download | bcm5719-llvm-f30101186f97f1edae855587ae64637e25a86811.tar.gz bcm5719-llvm-f30101186f97f1edae855587ae64637e25a86811.zip |
Implement substitution of a function parameter pack for its set of
instantiated function parameters, enabling instantiation of arbitrary
pack expansions involving function parameter packs. At this point, we
can now correctly compile a simple, variadic print() example:
#include <iostream>
#include <string>
void print() {}
template<typename Head, typename ...Tail>
void print(const Head &head, const Tail &...tail) {
std::cout << head;
print(tail...);
}
int main() {
std::string hello = "Hello";
print(hello, ", world!", " ", 2011, '\n');
}
llvm-svn: 123000
Diffstat (limited to 'llvm/utils/TableGen/TGParser.cpp')
0 files changed, 0 insertions, 0 deletions