public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mws <mws@twisted-brains.org>
To: gcc-help@gcc.gnu.org
Cc: Dima Sorkin <dima.sorkin@gmail.com>
Subject: Re: STL vector
Date: Wed, 02 Nov 2005 18:50:00 -0000	[thread overview]
Message-ID: <200511021950.53693.mws@twisted-brains.org> (raw)
In-Reply-To: <e40293600511010201h418d1a62x8fb2553e1d6bc66b@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

On Tuesday 01 November 2005 11:01, Dima Sorkin wrote:
> > i'll think i'll implement my own templates for the std::<classes> with
> > extended safety.
>  Before you do it, try debug mode of STLport (www.stlport.org).
> It is almost paranoidal mode, it checks things you could not even
> fantasize about.
> 
> Regards,
>  Dima.
> 
yes, i downloaded it and had a look at the source:

  void pop_back() {
    --this->_M_finish;
    _Destroy(this->_M_finish);
  }

the same unchecked stuff :)

so, still there is the option to have my own classes.
sometimes, standards are of a crazy design imho.

performance does matter _all_ time,
safety, code reduction is like an unreal feature.

thus better do reinvent a wheel by creating your own kind of STL?
know all issues and trapdoors.
if you fall into one, wonder and wonder,
have look at bits/.....h and find out, 
that a sigsegv is not caused by the push_back(T),
but by a long time ago pop_back() at totally different position of source.

regards
marcel

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-11-02 18:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-31 12:12 Mws
2005-10-31 12:17 ` John Love-Jensen
2005-10-31 12:32   ` Mws
2005-10-31 12:49     ` John Love-Jensen
2005-10-31 12:53       ` Mws
2005-11-01 10:01         ` Dima Sorkin
2005-11-02 18:50           ` Mws [this message]
2005-11-03 12:16             ` Dima Sorkin
2005-11-03 15:49             ` random
2005-11-03 16:25               ` Mws
2005-11-01 21:12 ` random

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200511021950.53693.mws@twisted-brains.org \
    --to=mws@twisted-brains.org \
    --cc=dima.sorkin@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).