1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
// This one works for constructors that take exactly 1 parameter
template< typename T, typename P1 >
static T* GetInstance( const P1& p1 ) { ... }
// This one works for constructors that take exactly 2 parameters
template< typename T, typename P1, typename P2 >
static T* GetInstance( const P1& p1, const P2& p2 ) { ... }
// ...etc...
template< typename T, typename P1, typename P2, typename P3, typename P4,
typename P5, typename P6, typename P7, typename P8, typename P9 >
static T* GetInstance( const P1& p1, const P2& p2, const P3& p3, const P4& p4,
const P5& p5, const P6& p6, const P7& p7, const P8& p8,
const P9& p9 ) { ... }
// ...etc...
|