#include <initializer_list> struct Vector { float v[3]; Vector(std::initializer_list<float> values) : v{values} {} }; int main() { Vector v = {1, 2, 3}; }
Standard input is empty
prog.cpp: In constructor ‘Vector::Vector(std::initializer_list<float>)’: prog.cpp:7:59: error: cannot convert ‘std::initializer_list<float>’ to ‘float’ in initialization
Standard output is empty