Topic: Is there any standard?


Author: "Alexander Dymerets" <sashad@omela.odessa.ua>
Date: 1998/06/29
Raw View
> I'm trying to convert source from Visual 5 to Borland 5.02 and have
> some problems with unexpected differences. The first thing is I can't

BC5 supports standard on 80%. Why do you need this convertation? VC is
beter.



[ 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    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: "P.J. Plauger" <pjp@dinkumware.com>
Date: 1998/06/29
Raw View
Edward Diener <eddielee@abraxis.com> wrote in article <35965DF1.13CB112C@abraxis.com>...
> Borland C++ Builder 3 is much closer to supporting the C++ standard than BC++
> 5.02. In Builder 3 the stringstream variations are supported, set<int> works
> fine ( it works fine for me under BC++ 5.02 ), and the class names such as
> bad_typeid conform much more closely to the C++ standard. Builder 3 doesn't
> yet support default template parameters or template member functions but this
> should be remedied ( I hope ) by the next major release. On the other hand,
> as various people have remarked in this newsgroup and the
> comp.lang.c++.moderated newsgroup, VC++ still has a way to go before it
> supports the C++ standard, especially in the area of templates.

Well, yes, but it does offer rather more than Borland does at the moment,
at least AFAIK.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
---
[ 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    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: "Paul D. DeRocco" <pderocco@ix.netcom.com>
Date: 1998/06/29
Raw View
Joerg Amhofer wrote:
>
> I'm trying to convert source from Visual 5 to Borland 5.02 and have
> some problems with unexpected differences. The first thing is I can't
> use 'istringstream(string)' in Borland  but have to use
> 'istrstream(char*)'. Why can't I use a simple 'set<int>' template
> without a compiler error? Is it really possible that the 'bad_typeid'
> class is named 'Bad_typeid'  in Borland?

I'm only up to 5.01, so am disappointed to hear that as of 5.02 they
_still_ haven't added stringstream. I don't know what the problem with
set<int> is. As to Bad_typeid, you could hack that with a #define.

You might log on to the forums.borland.com news server, and see if the
latest Borland C++ Builder fixes any of this stuff. 5.02 isn't really
current any more.

--

Ciao,
Paul
---
[ 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    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: jamhofer@sbox.tu-graz.ac.at (Joerg Amhofer)
Date: 1998/06/28
Raw View
Hello, some questions concerning the Language Standard

I'm trying to convert source from Visual 5 to Borland 5.02 and have
some problems with unexpected differences. The first thing is I can't
use 'istringstream(string)' in Borland  but have to use
'istrstream(char*)'. Why can't I use a simple 'set<int>' template
without a compiler error? Is it really possible that the 'bad_typeid'
class is named 'Bad_typeid'  in Borland?

After reading the 3rd Ed. of "The C++ P. L." I thought there was a
real standard C++ (How near is this book really to the final
Standard).  Therefor I sticked mostly to the syntax which is used in
the book and thought everything was ok because Visual C supported it
as it was without problems. But now? What are the main differences
between Borland and Microsoft in respect to the standard described in
the book?

Answers, comments suggestions are really welcome

AJ
---
[ 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    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: loewis@informatik.hu-berlin.de (Martin v. Loewis)
Date: 1998/06/28
Raw View
jamhofer@sbox.tu-graz.ac.at (Joerg Amhofer) writes:

> The first thing is I can't use 'istringstream(string)' in Borland
> but have to use 'istrstream(char*)'.

Borland C is wrong. There is a typedef istringstream in standard C++,
and it accepts a std::string as parameter.

There is also a class istrsteam in C++, but it is deprecated.

> Why can't I use a simple 'set<int>' template without a compiler
> error?

Depends on the context. If you use it in

#include <set>

std::set<int> x;

it should work fine.

> Is it really possible that the 'bad_typeid' class is named
> 'Bad_typeid' in Borland?

It is possible that it is called that way in Borland C. That would be
non-compliant.

> After reading the 3rd Ed. of "The C++ P. L." I thought there was a
> real standard C++ (How near is this book really to the final
> Standard).

I believe that there is no standard at the moment, but is expected to
be adopted any time now, the voting period was over a week ago.

Regards,
Martin
---
[ 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    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: "P.J. Plauger" <pjp@dinkumware.com>
Date: 1998/06/28
Raw View
Joerg Amhofer <jamhofer@sbox.tu-graz.ac.at> wrote in article <3596cb8c.236239@news.tu-graz.ac.at>...
> Hello, some questions concerning the Language Standard
>
> I'm trying to convert source from Visual 5 to Borland 5.02 and have
> some problems with unexpected differences. The first thing is I can't
> use 'istringstream(string)' in Borland  but have to use
> 'istrstream(char*)'. Why can't I use a simple 'set<int>' template
> without a compiler error? Is it really possible that the 'bad_typeid'
> class is named 'Bad_typeid'  in Borland?
>
> After reading the 3rd Ed. of "The C++ P. L." I thought there was a
> real standard C++ (How near is this book really to the final
> Standard).  Therefor I sticked mostly to the syntax which is used in
> the book and thought everything was ok because Visual C supported it
> as it was without problems. But now? What are the main differences
> between Borland and Microsoft in respect to the standard described in
> the book?

The C++ Standard changed essentially once every four months for eight
years. We think it is technically frozen as of November 1997, but it has
not been formally approved yet. Major compiler vendors have long development
cycles. Even book authors occasionally must print words that are mildly out
of date by the time they appear in print.

What you're seeing is the differences between three different snapshots of
a steadily changing draft C++ Standard. And the images are often blurred,
since a compiler seldom exactly matches the draft at one precise moment
in time in all regards. Expect dialect issues of the sort you report above to
continue for the next year or two, while compiler vendors and authors catch
up to the final C++ Standard.

BTW, it doesn't help that you're moving from a more compliant implementation
to one that's less compliant.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
---
[ 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    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: Edward Diener <eddielee@abraxis.com>
Date: 1998/06/28
Raw View
Borland C++ Builder 3 is much closer to supporting the C++ standard than BC++
5.02. In Builder 3 the stringstream variations are supported, set<int> works
fine ( it works fine for me under BC++ 5.02 ), and the class names such as
bad_typeid conform much more closely to the C++ standard. Builder 3 doesn't
yet support default template parameters or template member functions but this
should be remedied ( I hope ) by the next major release. On the other hand,
as various people have remarked in this newsgroup and the
comp.lang.c++.moderated newsgroup, VC++ still has a way to go before it
supports the C++ standard, especially in the area of templates.

Joerg Amhofer wrote:

> Hello, some questions concerning the Language Standard
>
> I'm trying to convert source from Visual 5 to Borland 5.02 and have
> some problems with unexpected differences. The first thing is I can't
> use 'istringstream(string)' in Borland  but have to use
> 'istrstream(char*)'. Why can't I use a simple 'set<int>' template
> without a compiler error? Is it really possible that the 'bad_typeid'
> class is named 'Bad_typeid'  in Borland?
>
> After reading the 3rd Ed. of "The C++ P. L." I thought there was a
> real standard C++ (How near is this book really to the final
> Standard).  Therefor I sticked mostly to the syntax which is used in
> the book and thought everything was ok because Visual C supported it
> as it was without problems. But now? What are the main differences
> between Borland and Microsoft in respect to the standard described in
> the book?
---
[ 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    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]