Skip to content

Commit 2975360

Browse files
committed
variadic template function.
1 parent 0da2037 commit 2975360

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

understanding-c++11/variadic_template.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ void Printf( const char * s, T val, Args...args ) {
9696
while ( *s ) {
9797
if (*s == '%' && *++s != '%')
9898
{
99-
std::cout << val; // notice: val's type is known.
99+
// val's type is known. not like va_arg(args, type).
100+
std::cout << val;
100101
return Printf( ++s, args... );
101102
}
102103
std::cout << *s++;

0 commit comments

Comments
 (0)