Debug features on libstdc++ in Linux?
I was running my code under debug mode in VS2010 and it catched a nice error about invalid operator< which wasn't a strict weak ordering. Is there a way to catch these errors in libstdc++ on Linux or such conservative checks are only a feature 开发者_运维问答of visual studio 2010?
Defining _GLIBCXX_DEBUG
should do the trick. :)
http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt03ch17s03.html#debug_mode.using.mode
精彩评论