I use list and set templates in my SDI MFC APP. well, I have no problems with them, but always when I rebuild the whole project I get 40 warnings!
I tried to disable them by using:
#pragma warning (disable : 4786)
but I still get some warnings. question: where exactly do I have to place this? in *.cpp or *.h files? do I have to care about a special position to place it? is my pragma wrong?
example of a warning:
c:\program files\microsoft visual studio\vc98\include\xtree(160) : warning C4786: 'std::_Tree<CScene3DS *,CScene3DS *,std::set<CScene3DS *,std::less<CScene3DS *>,std::allocator<CScene3DS *> >::_Kfn,std::less<CScene3DS *>,std::allocator<CScene3DS *>
>::_Tree<CScene3DS *,CScene3DS *,std::set<CScene3DS *,std::less<CScene3DS *>,std::allocator<CScene3DS *> >::_Kfn,std::less<CScene3DS *>,std::allocator<CScene3DS *> >' : identifier was truncated to '255' characters in the debug information
SYMPTOMS
Warnings similar to the following are generated even if you use the warning pragma to disable the warning:
warning C4786:
'std::rb_tree<CAiSpanningTree<State,std::less<State>>::TransClosureNode, CAiSpanningTree<State,std::less<State>>::TransClosureNode,std::ident<Cai SpanningTree<State,std::less<State>>::TransClosureNode,CAiSpanningTree<S tate,std::less<State>>::TransClosureNode>,std::less<CAiSpanningTree<Stat e,std::less<State>>::TransClosureNode>>' : identifier was truncated to '255' characters in the debug information
The code:
#pragma warning(disable:4786)
disables warnings that list the file and line number. For example:
C:\test\Text.cpp(25) : warning C4786:
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
MORE INFORMATION
This warning can be ignored. However, the identifier may not be accessible or viewable in the debugger.
Gabriel.
_
Forever trusting who we are
And nothing else matters - Metallica
_
Gabriel, CodeGuru moderator
Forever trusting who we are
And nothing else matters - Metallica
Bookmarks