Consider next example:
template<typename T>
class A
{
public:
A(int p1, int p2, //any arguments needed for T constructor);
private:
std::vector<T> vec;
};
template<typename T>
A<T>::A(int p1, int p2, //any arguments needed for T constructor)
{
for(size_t i = 0; i < 10; ++i)
{
vec.push_back(T(//any arguments needed for T constructor))
{
}
Can I create class template that would accept type with any constructor signature?