Topic: New STL Draft


Author: herwin@osf1.gmu.edu (HARRY R. ERWIN)
Date: 1997/03/03
Raw View
I've been testing the Codewarrior 11 STL against the programs in Nelson's
C++ Programmer's Guide to the Standard Template Library. I've found that I
have to explicitly call out the allocator. E.g., vector<T, allocator<T> >.
And that I have to explicitly instantiate iterator_trait<T*> for
user-defined types. E.g.,

null_template
struct iterator_trait <const foo*> {
 typedef ptrdiff_t
distance_type;
 typedef const foo
value_type;
 typedef random_access_iterator_tag iterator_category;
};

CW 11 uses Modena 2.1 (Nov 96) with a bunch of last-second patches. Are
these problems consequences of the revised standard, or are they due to
Metrowerks trying to keep up with late-breaking developments? (BTW, CW is
my preferred C++ compiler. They have problems where their competition
doesn't even have a clue.)

Cheers
--
Harry Erwin, Internet: herwin@gmu.edu, Web Page: http://osf1.gmu.edu/~herwin
PhD student in computational neuroscience (how bats echolocate)
Lecturer for CS 211 (data structures and advanced C++)
Senior Software Analyst supporting the FAA
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: MWRon@metrowerks.com (MW Ron)
Date: 1997/03/04
Raw View
In article <5fdd4h$spc@portal.gmu.edu>, herwin@osf1.gmu.edu (HARRY R.
ERWIN) wrote:

>CW 11 uses Modena 2.1 (Nov 96) with a bunch of last-second patches. Are
>these problems consequences of the revised standard, or are they due to
>Metrowerks trying to keep up with late-breaking developments? (BTW, CW is
>my preferred C++ compiler. They have problems where their competition
>doesn't even have a clue.)

Neither, I am afraid that this is a deficiency with CodeWarrior CW/11
implementation of templates.  We will be making corrections in the C++
compiler  to bring CodeWarrior  up to the standard.

Ron

--
METROWERKS                   Ron Liechty
"Software at Work"    MWRon@metrowerks.com
http://www.metrowerks.com/about/people/rogues.html#mwron
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: "Jess Holle" <jessh@ptc.com>
Date: 1997/03/11
Raw View
HARRY R. ERWIN <herwin@osf1.gmu.edu> wrote in article
<5fdd4h$spc@portal.gmu.edu>...
  .... complaints about annoying required syntax of vector<>
       in CW 11 C++ MSL libraries deleted ....

> CW 11 uses Modena 2.1 (Nov 96) with a bunch of last-second patches. Are
> these problems consequences of the revised standard, or are they due to
> Metrowerks trying to keep up with late-breaking developments? (BTW, CW is
> my preferred C++ compiler. They have problems where their competition
> doesn't even have a clue.)

These problems are a direct consequence of trying to keep their version of
MSL up to date with the standard without applying the necessary effort to
keep their C++ compiler reasonably close to the standard.  Basically
Metrowerks made CW 11's C++ MSL dependant on default template parameters
and partial template specialization for seemless use.  Unfortunately, their
C++ compiler supports neither language construct as of yet!

Except for the excessive use of 'inline', the CW 11 MSL seems pretty nice
_if_ CW 11 had adequate compiler compliance.  As it stands, however, they
should have skipped the iterator_trait<> changes or beefed up their
compiler (the default template argument stuff is just annoying, but the
iterator_trait<> problem is awful).

This is exactly why a compiler can't ignore "esoteric" parts of the
standard: because a desirable C++ library may well depend on them for
proper functioning/use.
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]