J
JeromeG
Hi,
I have a project that use to be developped on WIndows NT 4.0 sp6a and
Borland c++ builder 5.0.
Now this project has been compiled and linked on Windows XP and
Borland c++ 6.0.
The reason i am writting this note on this group is the following:
I have a warning on each std::for_each use.
This warning is : Warning W8091
"Argument template, _InputIter passed to "for_each" is an ouput
iterator : input iterator required"
Befor with BCB5, i have no warnings on the using of for_each. Here are
the code lines:
///////////////////////////////////////////////////////////////////////////////
std::set<VM_CleElement>::const_iterator it1 =
fElementsToujoursVisibles.begin();
std::set<VM_CleElement>::const_iterator it2 =
fElementsToujoursVisibles.end();
VM_SauvegardeCleElements toto(registry.get(),
"ElementToujoursVisible");
std::for_each(it1, it2, toto );
///////////////////////////////////////////////////////////////////////////////
with declaration as following:
///////////////////////////////////////////////////////////////////////////////
class CFG_Configuration::VM_SauvegardeCleElements
{
TRegistry * fRegistry;
AnsiString fValeur;
long fIndex;
public:
VM_SauvegardeCleElements( TRegistry * _registry, const char *
_valeur);
void operator()( const CFG_Configuration::VM_CleElement & _elt);
};
///////////////////////////////////////////////////////////////////////////////
DOes anyone what to use as iterator (or something else?) to correct
this warning?
Thx for all ur answers !
Any help would be very appreciated.
Jerome
I have a project that use to be developped on WIndows NT 4.0 sp6a and
Borland c++ builder 5.0.
Now this project has been compiled and linked on Windows XP and
Borland c++ 6.0.
The reason i am writting this note on this group is the following:
I have a warning on each std::for_each use.
This warning is : Warning W8091
"Argument template, _InputIter passed to "for_each" is an ouput
iterator : input iterator required"
Befor with BCB5, i have no warnings on the using of for_each. Here are
the code lines:
///////////////////////////////////////////////////////////////////////////////
std::set<VM_CleElement>::const_iterator it1 =
fElementsToujoursVisibles.begin();
std::set<VM_CleElement>::const_iterator it2 =
fElementsToujoursVisibles.end();
VM_SauvegardeCleElements toto(registry.get(),
"ElementToujoursVisible");
std::for_each(it1, it2, toto );
///////////////////////////////////////////////////////////////////////////////
with declaration as following:
///////////////////////////////////////////////////////////////////////////////
class CFG_Configuration::VM_SauvegardeCleElements
{
TRegistry * fRegistry;
AnsiString fValeur;
long fIndex;
public:
VM_SauvegardeCleElements( TRegistry * _registry, const char *
_valeur);
void operator()( const CFG_Configuration::VM_CleElement & _elt);
};
///////////////////////////////////////////////////////////////////////////////
DOes anyone what to use as iterator (or something else?) to correct
this warning?
Thx for all ur answers !
Any help would be very appreciated.
Jerome