#include <iostream>
#include <utility>

struct A1 {
	A1() {
		printf("A1() called\n");
	}
	
	A1(std::size_t i) {
		printf("A1(%d) called\n", i);
	}
	
	A1(std::size_t i, std::size_t j) {
		printf("A1(%d, %d) called\n", i, j);
	}
};

struct A2 {
	A2(std::size_t i, std::size_t j, double k) {
		printf("A2(%d, %d, %lf) called\n", i, j, k);
	}
};

template <class T, size_t Size>
class B {
    template<typename Arg1, typename ...Args, size_t... Is>
    B(std::index_sequence<Is...>, const Arg1 &arg1, const Args &...args) :
    tab{ {(void(Is), arg1), args... }... }
    {}
        
    public:
    
    T tab[Size];
    
    B() = default;

    template<typename ...Args>
    B(const Args &...args)
        : B(std::make_index_sequence<Size>(), args...) {}
};

int main() {
	static constexpr size_t Size = 100;
	B<A1, Size> b1(11, 17);
	B<A1, Size> b1a(11);
	B<A1, Size> b1b;
	B<A2, Size> b2(11, 17, 1.2);
	return 0;
}