Another possibility is to make TContainer
a variadic template:
#include
struct TObject {};
struct IUnknown {};
template class TContainer, class TObject>
class Foobar
{
public:
explicit Foobar( TContainer & container ) : container_( container ){}
private:
TContainer & container_;
};
int main() {
std::vector v;
Foobar bla( v );
return 0;
}