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 | 12c9c00024a01819e3a70ef6d951d32efaeb9312 (patch) | |
tree | 0c6499b83aab17269756d4e65041d29374506256 /lib/Serialization/ASTWriter.cpp | |
parent | 170464b7c0a2c0c86f2821f14a46f0d540cb5e94 (diff) |
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');
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123000 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
0 files changed, 0 insertions, 0 deletions