I am wondering if a std::array<std::pair<int,int>>
class member can be set using a template parameter. I do not want to use the constructor of the class.
So it would be something like this:
template<int N, std::array<std::pair<int,int>,N> arr>
class test
{
public:
private:
std::array<std::pair<int,int>,N> m_arr=arr;
};
int main()
{
constexpr std::array<std::pair<int,int>,N> arr
{{
{1,2},
{3,4},
{5,6}
}};
test<3,arr> t;
return 0;
}
Thanks in advance.