#include <iostream>
#include <array> 

template<class... Args>
void f(Args&... args)
{
	for(const auto& a : {args...})
	{
		std::cout<<a<<std::endl;
	}
}
 
 
namespace Helper {
template<unsigned int N,unsigned int I > 
struct Caller 
{
    template<class T, class...Args>
    static void call( const std::array<T,N>& arr, Args... args  )
    {
	    Caller<N,I-1>::call( arr, std::get<I-1>(arr), args... );
    }
};

template <unsigned int N>
struct Caller<N, 0>
{
    template< class T, class...Args>
    static void call(const std::array<T,N>&  arr, Args&... args)
    {
        f(args...);
    }
};
}

template<typename T, unsigned N>
void call_f(const std::array<T,N>& arr)
{
	Helper::Caller<N,N>::call(arr);
}
int main() {
 
	std::array<float,3> array = {4.3, 3.14,2.1} ;
 
	call_f(array);
	return 0;
}
