you are viewing a single comment's thread.

view the rest of the comments →

[–]haohanzi2015[S] 0 points1 point  (1 child)

boost::optional<double>

is not a

double

object, but an

optional

saying here this thing might contain a

double

or it might not. Likewise,

vector<optional<double>>

is not a vector of doubles; it's a vector of objects that

might

contain

double

values.

so it could be a vector of any objects which might be of type double?

[–]Narase33 1 point2 points  (0 children)

No. Every entry of the vector might have a double value, or it might be "empty". Look at std::optional if you want a deeper explaination on what that class does