M
Marc Schellens
I have a:
vector<A> V;
an
A* a;
which might point to one element of V.
How to check this most quickly?
I am using for now something like
if( V.size() > 0 && a >= &V[0] && a <= &V[ V.size()] ) { it_is_in();}
which works fine for me, but is this standard conform?
And if not: My application will never run on an embedded system.
Does anybody know any existing standard conform compiler on lets
say any unix-workstation, windows system, mac or even VMS
where the above code would produce not the expected?
thanks,
marc
vector<A> V;
an
A* a;
which might point to one element of V.
How to check this most quickly?
I am using for now something like
if( V.size() > 0 && a >= &V[0] && a <= &V[ V.size()] ) { it_is_in();}
which works fine for me, but is this standard conform?
And if not: My application will never run on an embedded system.
Does anybody know any existing standard conform compiler on lets
say any unix-workstation, windows system, mac or even VMS
where the above code would produce not the expected?
thanks,
marc