Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 681
piotr Avatar asked Feb 21 '26 06:02

piotr


1 Answers

Defining _GLIBCXX_DEBUG should do the trick. :)

http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt03ch17s03.html#debug_mode.using.mode

like image 157
jalf Avatar answered Feb 22 '26 21:02

jalf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!