Skip to content
Commit f3010118 authored by Douglas Gregor's avatar Douglas Gregor
Browse files

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
parent 1ec7ecce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment