disable4786.h

Go to the documentation of this file.
00001 #ifdef WIN32
00002 
00003 #pragma warning(disable:4786)
00004 // http://support.microsoft.com/support/kb/articles/Q167/3/55.ASP 
00005 // events that yes, it's a compiler bug that
00006 // #pragma warning(disable: 4786) doesn't always work.
00007 
00008 // They don't, however, list a workaround.
00009 
00010 // I found that, very strangely, #including <iostream> made the
00011 // remaining 4786 warnings go away!
00012 
00013 // Of course, #including <iostream> is inefficient and
00014 // slows compilation - so I whittled away most of what's in
00015 // <iostream> and discovered that the  active ingredient  in
00016 // <iostream> appears to be a declaration of a static class,
00017 // complete with default constructor.
00018 
00019 // For some reason, this works around the bug!
00020 // Why does this work? Beats me, ask those smart guys at MS who
00021 // wrote the compiler.
00022 
00023 class msVC6_4786WorkAround {
00024 public:
00025     msVC6_4786WorkAround() {}
00026 };
00027 
00028 static msVC6_4786WorkAround
00029 WowIWonderWhatCrapCodeMustBeInTheCompilerToMakeThisWorkaroundWork;
00030 
00031 #endif // WIN32
00032 
00033 // End of File
00034 
00035 /* 
00036  * ------------------------------------------------------------
00037  *   End of disable4786.h
00038  * ------------------------------------------------------------
00039  *   Automatic Emacs configuration follows.
00040  *   Local Variables:
00041  *   mode:c++
00042  *   c-basic-offset: 4
00043  *   eval: (c-set-offset 'substatement-open 0)
00044  *   eval: (c-set-offset 'case-label '+)
00045  *   eval: (c-set-offset 'statement 'c-lineup-runin-statements)
00046  *   eval: (setq indent-tabs-mode nil)
00047  *   End:
00048  * ------------------------------------------------------------ 
00049  */

Generated on Wed Feb 28 15:18:51 2007 for NaviTrack by  doxygen 1.4.6