struct Data{
Data() = default;
Data(std::initializer_list<float> list) {
>> std::copy(list.begin() , list.begin() + 4, std::begin(data));
}
float data[4] = { 0, 0, 0, 1 };
};
warning C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
Since I need this data to be into a standard-layout structure which I can stitch into a memory buffer, I can't use std::array
.
How can I solve this problem and/or workaround it without disabling the warning?