The example code assumes that x.begin() is implicitly convertible to const double *, but instead x.begin() returns a const_iterator type that can't be implicitly (or explicitly) converted to a pointer. Using x.data() instead of x.begin() corrects the problem.
The example code assumes that
x.begin()is implicitly convertible toconst double *, but insteadx.begin()returns aconst_iteratortype that can't be implicitly (or explicitly) converted to a pointer. Usingx.data()instead ofx.begin()corrects the problem.