V
Vladimir
Colleagues,
Suppose I have (in simplified form, of course)
struct Vect2D {
double x, y;
Vect2D(double x_, double y_) : x(x_), y(y_) {}
};
which I have to construct with random numbers:
Vect2D v(rand(), rand());
But this is "Ambiguous Expression" - i.e. "...language does not
guarantee the order in which arguments to a function call are
evaluated."
I was beaten by such type of code indeed - release and debug builds
behave differently
Above code is so typical, do I have to force explicit order of argument
evaluation? It would not be so compact and nice.
Suppose I have (in simplified form, of course)
struct Vect2D {
double x, y;
Vect2D(double x_, double y_) : x(x_), y(y_) {}
};
which I have to construct with random numbers:
Vect2D v(rand(), rand());
But this is "Ambiguous Expression" - i.e. "...language does not
guarantee the order in which arguments to a function call are
evaluated."
I was beaten by such type of code indeed - release and debug builds
behave differently
Above code is so typical, do I have to force explicit order of argument
evaluation? It would not be so compact and nice.