std::map issues, and pointer-to-function question

Started by
14 comments, last by daerid 22 years, 1 month ago
quote:Original post by SabreMan
Several reasons, I guess. It''s not too hard to imagine implementing a state machine using this sort of technique - i.e. you could modify the runtime behaviour of an event according to the current state.


Oh, I thought we''re just talking about event/message
handling for Windows (or whatever).


Premature optimizations can only slow down your project even more.
神はサイコロを振らない!
Advertisement
quote:Original post by tangentz
Oh, I thought we''re just talking about event/message
handling for Windows (or whatever).


We were. Message despatching is not mutually exclusive with state machines. Far from it.

--
The Dilbert Principle: People are idiots.
>>Whenever I use a std::map in my project, I always get the "Identifier truncated to 255 characters in Debug information" warning, even if I''m just doing a std::map

You''re actually not just doing a std::map, you''re really using
std::map,std::alloc>,int,std::less,std::alloc>,std::alloc>

It''s not really hard to exceed that 255 char limit once you get going =)

By the way, VC.NET doesn''t have that warning.
I realize that, but my point was the code just says "std::map blah;"
daerid@gmail.com
also, when I use a std::pair to insert into the map, I end up getting the same 4786 warning, even if I use the #pragma warning(disable:4786) directive
daerid@gmail.com
Make sure the #pragma is the first line of the file, or near enough. A lot of people report that it doesn''t work, but I''ve always found that it does if it comes before all the #includes.

And the member function as windows callback question comes up almost literally every day - do search the forums before posting.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]

This topic is closed to new replies.

Advertisement