STL in debug mode?

Discussion in 'C++' started by Matthias, Jan 31, 2005.

  1. Matthias

    Matthias Guest

    Hi,

    I have just read in another thread (didn't want to hijack it) that STL
    containers may operate more safe in "debug builds". Are we talking about
    a debug build when the _DEBUG flag is set (on gcc)? I have grep'ed for
    _DEBUG in all files of my STL implementation but couldn't come up with
    anything.
    How do I enable the STL to work in debug mode?

    I am using the GNU C++ implementation, gcc 3.4.3.
    Matthias, Jan 31, 2005
    #1
    1. Advertising

  2. "Matthias" <> wrote in message
    news:ctkuqi$kuu$03$-online.com...
    > I have just read in another thread (didn't want to hijack it) that STL
    > containers may operate more safe in "debug builds". Are we talking about a
    > debug build when the _DEBUG flag is set (on gcc)?

    This is an implementation-specific feature. It will typically require
    compiling (your application, and eventually library files) with a specific
    macro defined.
    STLport (www.stlport.org) had pioneered the implementation of such a
    debug mode, with extensive range checking, validation of all iterators
    and ranges, etc. It can be used with a wide range of compilers.

    > I have grep'ed for _DEBUG in all files of my STL implementation but
    > couldn't come up with anything.
    > How do I enable the STL to work in debug mode?


    I think some vendors/platforms have started to include functionality
    similar to that of STLport. But I don't know about gcc.
    You probably should ask about its status on a platform-specific forum...

    Ivan
    --
    http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form
    Ivan Vecerina, Jan 31, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave
    Replies:
    0
    Views:
    639
  2. =?Utf-8?B?TWF4?=
    Replies:
    0
    Views:
    463
    =?Utf-8?B?TWF4?=
    Feb 11, 2006
  3. rbg
    Replies:
    0
    Views:
    428
  4. sujeet
    Replies:
    5
    Views:
    572
    Bart van Ingen Schenau
    Sep 16, 2007
  5. Replies:
    1
    Views:
    243
    Peter Zolja
    Jan 31, 2007
Loading...

Share This Page