Skip to content

_GLIBCXX_DEBUG #4

@user706

Description

@user706

Will not work when defining macro _GLIBCXX_DEBUG, which is a cool feature that enables bounds checking on vector etc. (so instead of undefined behaviour, you will get an exact message about a bounds violation, which is great for e.g. unittests, etc)

Things will then look more or less like this (at least for gcc):

#ifdef _GLIBCXX_DEBUG
namespace std
{
    inline namespace __debug
    {
    template<typename _Tp, typename _Allocator>
    class vector;
    }
}

#else
namespace std {
template<typename _Tp, typename _Alloc>
class vector;
}
#endif

etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions