BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Input Iterator needed in std::for_each

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language)
View previous topic :: View next topic  
Author Message
JeromeG
Guest





PostPosted: Thu Jun 24, 2004 6:55 am    Post subject: Input Iterator needed in std::for_each Reply with quote



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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.