Making Attach()
a template would allow you to do what you're aiming for. The code gets messy but it let's you call it the way you want.
template<typename A1>
void Attach(A1 a1);
template<typename A1, typename A2>
void Attach(A1 a1, A2 a2);
template<typename A1, typename A2, typename A3>
void Attach(A1 a1, A2 a2, A3 a3);
template<typename A1, typename A3, typename A4>
void Attach(A1 a1, A2 a2, A3 a3, A4 a4);
SilverSun
2010-08-19 14:32:26