A
Adam Benson
Hi,
Does anyone know why the top example is OK, but the bottom one gives a warning ?
void X()
{
void * p;
// This is OK ...
std::vector<int> int_v;
std::vector<int>::iterator int_i;
p = (void *) &( *(int_v.begin() + 5) );
// This gives : warning C4238: nonstandard extension used : class rvalue used as lvalue
std::vector<bool> bool_v;
std::vector<bool>::iterator bool_i;
p = (void *) &( *(bool_v.begin() + 5) );
}
Cheers,
Adam.
--
===========================
Adam Benson
Omnibus Systems,
Leics. UK
Email : (e-mail address removed)
Does anyone know why the top example is OK, but the bottom one gives a warning ?
void X()
{
void * p;
// This is OK ...
std::vector<int> int_v;
std::vector<int>::iterator int_i;
p = (void *) &( *(int_v.begin() + 5) );
// This gives : warning C4238: nonstandard extension used : class rvalue used as lvalue
std::vector<bool> bool_v;
std::vector<bool>::iterator bool_i;
p = (void *) &( *(bool_v.begin() + 5) );
}
Cheers,
Adam.
--
===========================
Adam Benson
Omnibus Systems,
Leics. UK
Email : (e-mail address removed)