delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2012/05/29/20:45:16

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: vector.h
Date: Tue, 29 May 2012 17:22:08 -0700 (PDT)
Organization: http://groups.google.com
Lines: 48
Message-ID: <fc7b8764-86a0-43d4-92dc-507c6ea7bb37@a1g2000yqd.googlegroups.com>
References: <a141b2cd-d68f-4215-9796-e51762c21510 AT f30g2000vbz DOT googlegroups DOT com>
<a2kdvlFf1lU1 AT mid DOT dfncis DOT de>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1338337452 27236 127.0.0.1 (30 May 2012 00:24:12 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Wed, 30 May 2012 00:24:12 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: a1g2000yqd.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16
(KHTML, like Gecko) Chrome/10.0.630.0 Safari/534.16,gzip(gfe)
Bytes: 3484
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q4U0j234031509
Reply-To: djgpp AT delorie DOT com

Hi,

On May 29, 12:05 pm, Hans-Bernhard Bröker <HBBroe DOT  DOT  DOT  AT t-online DOT de>
wrote:
> On 28.05.2012 22:31, Georg wrote:
>
> > I try to port a Linux program that includes<vector.h>. This file is
> > not in my djgpp include directory.
>
> Nor is it supposed to be.  Not any more, anyway.  <vector.h> is a way
> pre-standard name (and implementation) of what eventually became the C++
> standard header <vector>
>
> There's very little, if any justification for any program to still be
> trying to use such outdated library components.

I admire your expertise in these areas, of course, but this particular
view is a bit simplistic.

The existences of standards are pretty random in what they include or
exclude, and none is perfect for everybody. Also, are some standards
better than other standards? The real issue is whether whatever
platform(s) Georg is targeting both supports the newer standard as
well as the older "de facto" standard. C++ has existed in various
forms since 1979. The books (according to Wikipedia) came out in 1985
(1st ed.), 1991 (2nd), and 1997 (3rd) + 2000 (3rd, special).

So while it's easy to champion C++98, let's not forget that a lot of
pre-existing code is probably still floating around. Also, in case it
wasn't obvious, I was implying that C++11 is out, hence "newer" and
"better". (But DJGPP doesn't fully support that yet, so I guess that's
not recommended.) I don't know if I agree with the idea that all old
code must "mandatory" be updated to newer standards when it "just
works" fine already.

I know I'm overthinking it, and I know some of this isn't what you
really meant, but it's a slippery slope.

P.S. I had thought I read somewhere that part of the idea of
"<vector>" instead of "<vector.h>" was to optionally allow backwards
compatibility if the vendor chose to do so. I guess GCC did not.
Considering their apparent support of standards when possible, I'm not
totally surprised, but I really don't know the details. EDIT: Aha! I
had forgotten that some "/backward/" files were removed after G++
4.2.3. So, Georg, it's there in older versions if you really want it.
(I know you don't now, just saying, for completeness ....)

2721  2008-02-12 00:23   include/cxx/4.23/backward/vector.h

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019