// HelloWorld.cpp : Defines the entry point for the console application.
//
#include <iostream>
#include <string>
template < typename T>
void show( const T& value)
{
std:: cout << value << std:: endl ;
}
template < typename U, typename ... T >
void foo( const U& head, const T& ... tail )
{
std:: cout << head;
show( tail...) ;
}
int main( )
{
int a = 12 ;
std:: string tbone( "Tbone" ) ;
foo( tbone, a, a) ;
return 0 ;
}
Ly8gSGVsbG9Xb3JsZC5jcHAgOiBEZWZpbmVzIHRoZSBlbnRyeSBwb2ludCBmb3IgdGhlIGNvbnNvbGUgYXBwbGljYXRpb24uCi8vCiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPHN0cmluZz4KCnRlbXBsYXRlPHR5cGVuYW1lIFQ+CnZvaWQgc2hvdyhjb25zdCBUJiB2YWx1ZSkKewogICAgc3RkOjpjb3V0IDw8IHZhbHVlIDw8IHN0ZDo6ZW5kbDsKfQoKCnRlbXBsYXRlPHR5cGVuYW1lIFUsIHR5cGVuYW1lLi4uIFQ+CnZvaWQgZm9vKGNvbnN0IFUmIGhlYWQsIGNvbnN0IFQmLi4uIHRhaWwpCnsKCXN0ZDo6Y291dCA8PCBoZWFkOwoJc2hvdyh0YWlsLi4uKTsKfQoKaW50IG1haW4oKQp7CglpbnQgYSA9IDEyOwoJc3RkOjpzdHJpbmcgdGJvbmUoIlRib25lIik7Cglmb28odGJvbmUsIGEsIGEpOwoJcmV0dXJuIDA7Cn0KCg==
compilation info
prog.cpp: In function 'void foo(const U&, const T& ...) [with U = std::basic_string<char>, T = {int, int}]':
prog.cpp:24:17: instantiated from here
prog.cpp:17:2: error: no matching function for call to 'show(const int&, const int&)'
stdout