Boost logo

Ublas :

Subject: [ublas] Can I reliably use &(Foo.data()[0]) to pass a pointer to matrix data?
From: Ramsey, James J CIV (US) (james.j.ramsey14.civ_at_[hidden])
Date: 2013-06-25 14:58:36


I know that with std::vector<Scalar> foo, I can pass a pointer to its data (e.g., to a function that expects an argument of Scalar*), and it should consistently work. Will something similar hold true if, say, I have a uBlas vector of Scalars Foo? That is, can I pass &(Foo.data()[0]) as a Scalar* argument in a function?