debug extension overhead

Jonathan Wakely jwakely.gcc@gmail.com
Wed May 20 23:54:00 GMT 2009


2009/5/21 Jonathan Wakely:
>
> If you explicitly change a single container to be a
> __gnu_debug::vector instead of std::vector (as above, *not* by
> defining _GLIBCXX_DEBUG) then you're using a distinct type and will
> get a compile-time or link-time failure.  To resolve that you "only"
> have to recompile everything that is affected by the change in type,
> just as you would if you changed MyClass::list_type from a vector to a
> deque.

... assuming you consistently use a typedef for the affected
container. Otherwise you might need to change loads of code that says
e.g. std::vector<int>::iterator, rather than
MyClass::list_type::iterator.

Jonathan



More information about the Libstdc++ mailing list