5 ms·
Enabling libstdc++ debug mode (-D_GLIBCXX_DEBUG) would probably have located the second one, assuming gcc. It adds bounds and other checks to containers like st
by omnicognate 4y ago
Enabling libstdc++ debug mode (-D_GLIBCXX_DEBUG) would probably have located the second one, assuming gcc. It adds bounds and other checks to containers like std::vector. [1]
Edit: The article mentions clang, so probably [2] is the relevant link.
[1] https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_using.html https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_u...
[2] https://libcxx.llvm.org/DesignDocs/DebugMode.html https://libcxx.llvm.org/DesignDocs/DebugMode.html
- account42 4y agoYou can use libstdc++ with Clang (-stdlib=libstdc++) and libc++ with GCC (-nostdlib along with adding the libraries and include paths manually). In fact, libstdc++ tends to be the default for Clang installs on Linux for ABI-compatibility with GCC-compiled C++ libraries unless you pass -stdlib=libc++.