Skip to content

Commit

Permalink
Fixed PrintVariadic implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris--A committed Nov 2, 2015
1 parent 30371a5 commit f86c455
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/lib/PrintVariadic.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@
template< typename derived >
struct PrintVariadic{

derived &printx( void ){ return CRTPO; }
template< typename S >
derived &printx_continue( S s ){ return CRTPO; }

template< typename T, typename... U >
derived &printx( const T& t, const U&... u ){
CRTPO << t;
return printx( u... );
return printx_continue( CRTPO << t, u... );
}

template< typename S, typename T, typename... U >
derived &printx_continue( S s, const T& t, const U&... u ){
return printx_continue( s << t, u... );
}
};
#else
Expand Down

0 comments on commit f86c455

Please sign in to comment.