Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #41080 > unrolled thread
| Started by | Marcel Mueller <news.5.maazl@spamgourmet.org> |
|---|---|
| First post | 2016-02-21 15:22 +0100 |
| Last post | 2016-02-22 00:50 +0100 |
| Articles | 20 on this page of 37 — 10 participants |
Back to article view | Back to comp.lang.c++
C++ complex.h protability Marcel Mueller <news.5.maazl@spamgourmet.org> - 2016-02-21 15:22 +0100
Re: C++ complex.h protability "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-21 16:48 +0100
Re: C++ complex.h protability Marcel Mueller <news.5.maazl@spamgourmet.org> - 2016-02-21 20:02 +0100
Re: C++ complex.h protability Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-21 14:25 -0500
Re: C++ complex.h protability Marcel Mueller <news.5.maazl@spamgourmet.org> - 2016-02-21 23:43 +0100
Re: C++ complex.h protability Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-21 20:44 -0500
Re: C++ complex.h protability Marcel Mueller <news.5.maazl@spamgourmet.org> - 2016-02-22 19:38 +0100
Re: C++ complex.h protability Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-22 14:14 -0500
Re: C++ complex.h protability Cholo Lennon <chololennon@hotmail.com> - 2016-02-22 16:36 -0300
Re: C++ complex.h protability Ian Collins <ian-news@hotmail.com> - 2016-02-23 08:53 +1300
Re: C++ complex.h protability Cholo Lennon <chololennon@hotmail.com> - 2016-02-22 17:03 -0300
Re: C++ complex.h protability Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-22 15:16 -0500
Re: C++ complex.h protability "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-22 21:38 +0100
Re: C++ complex.h protability Cholo Lennon <chololennon@hotmail.com> - 2016-02-22 17:50 -0300
Re: C++ complex.h protability Cholo Lennon <chololennon@hotmail.com> - 2016-02-22 18:09 -0300
Re: C++ complex.h protability legalize+jeeves@mail.xmission.com (Richard) - 2016-02-22 21:20 +0000
Re: C++ complex.h protability Öö Tiib <ootiib@hot.ee> - 2016-02-22 12:47 -0800
Re: C++ complex.h protability Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-22 16:18 -0500
Re: C++ complex.h protability Öö Tiib <ootiib@hot.ee> - 2016-02-22 13:51 -0800
Re: C++ complex.h protability Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-22 16:57 -0500
Re: C++ complex.h protability legalize+jeeves@mail.xmission.com (Richard) - 2016-02-22 22:16 +0000
Re: C++ complex.h protability Öö Tiib <ootiib@hot.ee> - 2016-02-22 15:09 -0800
Re: C++ complex.h protability Jerry Stuckle <jstucklex@attglobal.net> - 2016-02-22 19:53 -0500
Re: C++ complex.h protability Öö Tiib <ootiib@hot.ee> - 2016-02-22 23:23 -0800
Re: C++ complex.h protability Robert Wessel <robertwessel2@yahoo.com> - 2016-02-22 02:54 -0600
Re: C++ complex.h protability "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-21 22:05 +0100
Re: C++ complex.h protability bartekltg <bartekltg@gmail.com> - 2016-02-23 10:55 +0100
Re: C++ complex.h protability "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-23 19:45 +0100
Re: C++ complex.h protability "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-23 19:55 +0100
Re: C++ complex.h protability bartekltg <bartekltg@gmail.com> - 2016-02-23 20:41 +0100
Re: C++ complex.h protability "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-23 22:26 +0100
Re: C++ complex.h protability Christian Gollwitzer <auriocus@gmx.de> - 2016-02-22 08:16 +0100
Re: C++ complex.h protability Öö Tiib <ootiib@hot.ee> - 2016-02-22 02:06 -0800
Re: C++ complex.h protability Ian Collins <ian-news@hotmail.com> - 2016-02-22 09:00 +1300
Re: C++ complex.h protability Marcel Mueller <news.5.maazl@spamgourmet.org> - 2016-02-21 23:51 +0100
Re: C++ complex.h protability Öö Tiib <ootiib@hot.ee> - 2016-02-21 15:41 -0800
Re: C++ complex.h protability "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2016-02-22 00:50 +0100
Page 1 of 2 [1] 2 Next page →
| From | Marcel Mueller <news.5.maazl@spamgourmet.org> |
|---|---|
| Date | 2016-02-21 15:22 +0100 |
| Subject | C++ complex.h protability |
| Message-ID | <nach82$2uq$1@gwaiyur.mb-net.net> |
I have some compatibility issues regarding complex.h in an FFTW3
application.
In fact older C++ compilers required the include files with the .h
extension (and no namespace std::), i.e.
#include <math.h>
#include <complex.h>
This is deprecated but so far all relevant compilers supported the old
header files for compatibility. The code is quite old (~15 years) and
not namespace aware. I only upgraded to FFTW3 several years ago.
But now I try to switch to a newer compiler (gcc 4.8) and this raises a
conflict with the C99 compatibility header complex.h. Of course, this
does not support the resulting type definition in fftw3.h (compiled with -E)
typedef __complex__<long double> fftwl_complex;
The fftw3.h behaves differently when included from C++. This is an
application specific patch.
#ifdef __cplusplus
/* In C++ mode prefer class complex<> */
#include <complex.h>
# define FFTW_DEFINE_COMPLEX(R, C) typedef complex<R> C
extern "C"
{
#else /* __cplusplus */
/* If <complex.h> is included, use the C99 complex type. Otherwise
define a type bit-compatible with C99 complex */
#ifdef _Complex_I
# define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C
#else
# define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2]
#endif
#endif /* __cplusplus */
This worked with older gcc 3.x, IBM icc and AFAIK Watcom.
Is there an option to bring the old C++ complex.h compatibility back?
I tried
#include <complex>
using std::complex;
It seems to compile, but I am in doubt whether it is a good idea to mix
old style and new style headers within a single compilation unit.
Any suggestions, other than reworking all the old code for newer
standard compliance?
Marcel
[toc] | [next] | [standalone]
| From | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Date | 2016-02-21 16:48 +0100 |
| Message-ID | <nacm34$9hk$1@dont-email.me> |
| In reply to | #41080 |
On 21.02.2016 15:22, Marcel Mueller wrote:
> I have some compatibility issues regarding complex.h in an FFTW3
> application.
>
> In fact older C++ compilers required the include files with the .h
> extension (and no namespace std::), i.e.
> #include <math.h>
> #include <complex.h>
I believe the requirement had to be imposed by the FFTW3 headers.
No compilers can have imposed this requirement.
> This is deprecated but so far all relevant compilers supported the old
> header files for compatibility. The code is quite old (~15 years) and
> not namespace aware. I only upgraded to FFTW3 several years ago.
>
> But now I try to switch to a newer compiler (gcc 4.8) and this raises a
> conflict with the C99 compatibility header complex.h. Of course, this
> does not support the resulting type definition in fftw3.h (compiled with
> -E)
> typedef __complex__<long double> fftwl_complex;
>
> The fftw3.h behaves differently when included from C++. This is an
> application specific patch.
>
> #ifdef __cplusplus
> /* In C++ mode prefer class complex<> */
> #include <complex.h>
> # define FFTW_DEFINE_COMPLEX(R, C) typedef complex<R> C
This is wrong in two ways:
• Include of `<complex.h>`
It doesn't define the name used. Should be just `<complex>`.
• Use of unqualified template `complex`.
Should be `std::complex`.
> extern "C"
> {
> #else /* __cplusplus */
> /* If <complex.h> is included, use the C99 complex type. Otherwise
> define a type bit-compatible with C99 complex */
> #ifdef _Complex_I
> # define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C
> #else
> # define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2]
> #endif
> #endif /* __cplusplus */
This is a bit sloppy, and the comment is wrong, but should work.
Conclusion so far is that FFTW3 is coded by programmers who make trivial
errors all over the place – so that where it works, it probably works
by happenchance.
> This worked with older gcc 3.x, IBM icc and AFAIK Watcom.
>
> Is there an option to bring the old C++ complex.h compatibility back?
>
> I tried
>
> #include <complex>
> using std::complex;
>
> It seems to compile, but I am in doubt whether it is a good idea to mix
> old style and new style headers within a single compilation unit.
Above code is perfectly OK in an implementation file.
In the global namespace in a header the `using std::complex` can lead to
unintended name collisions.
> Any suggestions, other than reworking all the old code for newer
> standard compliance?
I suggest switching to another FFT-library, one that works. :)
Barring that, submit a patch the fixes the errors noted above, and just
hope that not too much more will go wrong.
Cheers & hth.,
- Alf
[toc] | [prev] | [next] | [standalone]
| From | Marcel Mueller <news.5.maazl@spamgourmet.org> |
|---|---|
| Date | 2016-02-21 20:02 +0100 |
| Message-ID | <nad1ku$a8d$1@gwaiyur.mb-net.net> |
| In reply to | #41081 |
On 21.02.16 16.48, Alf P. Steinbach wrote: >> In fact older C++ compilers required the include files with the .h >> extension (and no namespace std::), i.e. >> #include <math.h> >> #include <complex.h> > > I believe the requirement had to be imposed by the FFTW3 headers. > > No compilers can have imposed this requirement. 15 to 20 years ago all you get by #include <math> was "File not found". I don't remember exactly when the new headers came. >> #ifdef __cplusplus >> /* In C++ mode prefer class complex<> */ >> #include <complex.h> >> # define FFTW_DEFINE_COMPLEX(R, C) typedef complex<R> C > > This is wrong in two ways: > > • Include of `<complex.h>` > It doesn't define the name used. Should be just `<complex>`. > > • Use of unqualified template `complex`. > Should be `std::complex`. Earlier C++ compilers required exactly this syntax. > Conclusion so far is that FFTW3 is coded by programmers who make trivial > errors all over the place – so that where it works, it probably works > by happenchance. You should be careful and not blame the FFTW programmers for a patch that is part of the application code. The lines with the #ifdef __cplusplus are a hack specific to this application to make the C++ application work reasonably with FFTW without the need for dirty reinterpret casts all the way. Older C++ compilers did not support C99 _Complex, and the fallback to C[2] is really ugly, since it makes trivial mathematical operations like multiplication unreadable. >> #include <complex> >> using std::complex; >> >> It seems to compile, but I am in doubt whether it is a good idea to mix >> old style and new style headers within a single compilation unit. > > Above code is perfectly OK in an implementation file. > > In the global namespace in a header the `using std::complex` can lead to > unintended name collisions. The entire application code is not aware of namespaces. Probably the keyword "namespace" does not even exist once. As I already mentioned, it is quite old code. >> Any suggestions, other than reworking all the old code for newer >> standard compliance? > > I suggest switching to another FFT-library, one that works. :) FFTW works quite perfectly so far and it is really fast. For sure I will not reinvent the wheel because of minor problems like this. Marcel
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-21 14:25 -0500 |
| Message-ID | <nad2qc$tf5$1@jstuckle.eternal-september.org> |
| In reply to | #41083 |
On 2/21/2016 2:02 PM, Marcel Mueller wrote: > On 21.02.16 16.48, Alf P. Steinbach wrote: >>> In fact older C++ compilers required the include files with the .h >>> extension (and no namespace std::), i.e. >>> #include <math.h> >>> #include <complex.h> >> >> I believe the requirement had to be imposed by the FFTW3 headers. >> >> No compilers can have imposed this requirement. > > 15 to 20 years ago all you get by #include <math> was "File not found". > I don't remember exactly when the new headers came. > That's because 15 to 20 years ago the file "math" did not exist. > >>> #ifdef __cplusplus >>> /* In C++ mode prefer class complex<> */ >>> #include <complex.h> >>> # define FFTW_DEFINE_COMPLEX(R, C) typedef complex<R> C >> >> This is wrong in two ways: >> >> • Include of `<complex.h>` >> It doesn't define the name used. Should be just `<complex>`. >> >> • Use of unqualified template `complex`. >> Should be `std::complex`. > > Earlier C++ compilers required exactly this syntax. > Wrong, wrong, wrong. All C compilers from the very beginning just included whatever file was listed. #include <abc.xyz> would work if there was a file abc.xyz in the path. The *convention* at the time was to have header files with an extension of .h. But it was *never* a compiler requirement. >> Conclusion so far is that FFTW3 is coded by programmers who make trivial >> errors all over the place – so that where it works, it probably works >> by happenchance. > > You should be careful and not blame the FFTW programmers for a patch > that is part of the application code. > The lines with the #ifdef __cplusplus are a hack specific to this > application to make the C++ application work reasonably with FFTW > without the need for dirty reinterpret casts all the way. Older C++ > compilers did not support C99 _Complex, and the fallback to C[2] is > really ugly, since it makes trivial mathematical operations like > multiplication unreadable. > >>> #include <complex> >>> using std::complex; >>> >>> It seems to compile, but I am in doubt whether it is a good idea to mix >>> old style and new style headers within a single compilation unit. >> >> Above code is perfectly OK in an implementation file. >> >> In the global namespace in a header the `using std::complex` can lead to >> unintended name collisions. > > The entire application code is not aware of namespaces. Probably the > keyword "namespace" does not even exist once. As I already mentioned, it > is quite old code. > "namespace" has existed for at least 25 years. I'm not sure exactly which standard had it first, but we were using it in the early 90's. If your code is older than that, then it probably needs rewriting. >>> Any suggestions, other than reworking all the old code for newer >>> standard compliance? >> >> I suggest switching to another FFT-library, one that works. :) > > FFTW works quite perfectly so far and it is really fast. For sure I will > not reinvent the wheel because of minor problems like this. > > > Marcel No problem - you're the only one it affects. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Marcel Mueller <news.5.maazl@spamgourmet.org> |
|---|---|
| Date | 2016-02-21 23:43 +0100 |
| Message-ID | <nadej3$9ci$1@gwaiyur.mb-net.net> |
| In reply to | #41085 |
On 21.02.16 20.25, Jerry Stuckle wrote: >> Earlier C++ compilers required exactly this syntax. > > Wrong, wrong, wrong. All C compilers from the very beginning just > included whatever file was listed. s/compiler/runtime/; >>> In the global namespace in a header the `using std::complex` can lead to >>> unintended name collisions. >> >> The entire application code is not aware of namespaces. Probably the >> keyword "namespace" does not even exist once. As I already mentioned, it >> is quite old code. > > "namespace" has existed for at least 25 years. I'm not sure exactly > which standard had it first, but we were using it in the early 90's. All my complilers from the mid 90's can't deal with namespaces. Neither Borland supported them nor IBM VAC++ and AFAIR gcc 2.9.5 did not support it either. And well, from the release of a standard to the point where you can really use a feature are often years. I recently got complaints about C++11 code because still some common Linux Distros do not support it because they use gcc 4.7 which at least requires a compiler option and even with this option sometimes it does not work. > If > your code is older than that, then it probably needs rewriting. No, it is only about 15 years old. But some of the supported compilers did not know about namespaces at this time. Marcel
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-21 20:44 -0500 |
| Message-ID | <nadove$ud9$1@jstuckle.eternal-september.org> |
| In reply to | #41094 |
On 2/21/2016 5:43 PM, Marcel Mueller wrote: > On 21.02.16 20.25, Jerry Stuckle wrote: >>> Earlier C++ compilers required exactly this syntax. >> >> Wrong, wrong, wrong. All C compilers from the very beginning just >> included whatever file was listed. > > s/compiler/runtime/; > Wrong. Compilers. Header files have nothing to do with runtime. >>>> In the global namespace in a header the `using std::complex` can >>>> lead to >>>> unintended name collisions. >>> >>> The entire application code is not aware of namespaces. Probably the >>> keyword "namespace" does not even exist once. As I already mentioned, it >>> is quite old code. >> >> "namespace" has existed for at least 25 years. I'm not sure exactly >> which standard had it first, but we were using it in the early 90's. > > All my complilers from the mid 90's can't deal with namespaces. Neither > Borland supported them nor IBM VAC++ and AFAIR gcc 2.9.5 did not support > it either. > Sorry you had compilers which were not standards compliant. That does not mean it wasn't part of the standard. > And well, from the release of a standard to the point where you can > really use a feature are often years. I recently got complaints about > C++11 code because still some common Linux Distros do not support it > because they use gcc 4.7 which at least requires a compiler option and > even with this option sometimes it does not work. > Yes, it takes time for compiler developers to write code. Whether the compiler is up to date with the standard or the distro includes a standards-compliant compiler is immaterial to whether the item is part of the standard or not. >> If >> your code is older than that, then it probably needs rewriting. > > No, it is only about 15 years old. But some of the supported compilers > did not know about namespaces at this time. > > > Marcel It's not anyone else's fault that you were using non-standards compliant compilers. Namespaces were in the standard, and there were compilers supporting it. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Marcel Mueller <news.5.maazl@spamgourmet.org> |
|---|---|
| Date | 2016-02-22 19:38 +0100 |
| Message-ID | <nafkiv$qq$1@gwaiyur.mb-net.net> |
| In reply to | #41099 |
On 22.02.16 02.44, Jerry Stuckle wrote: > It's not anyone else's fault that you were using non-standards compliant > compilers. I enumerated *all existing* compilers for the platform at this time in the past. > Namespaces were in the standard, and there were compilers > supporting it. In theory. Marcel
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-22 14:14 -0500 |
| Message-ID | <nafmhn$3ja$2@jstuckle.eternal-september.org> |
| In reply to | #41110 |
On 2/22/2016 1:38 PM, Marcel Mueller wrote: > On 22.02.16 02.44, Jerry Stuckle wrote: >> It's not anyone else's fault that you were using non-standards compliant >> compilers. > > I enumerated *all existing* compilers for the platform at this time in > the past. > >> Namespaces were in the standard, and there were compilers >> supporting it. > > In theory. > > > Marcel In practice. I used them. Both on Windows and Linux/Unix. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Cholo Lennon <chololennon@hotmail.com> |
|---|---|
| Date | 2016-02-22 16:36 -0300 |
| Message-ID | <nafo08$1lnf$1@gioia.aioe.org> |
| In reply to | #41099 |
On 02/21/2016 10:44 PM, Jerry Stuckle wrote: > On 2/21/2016 5:43 PM, Marcel Mueller wrote: >> On 21.02.16 20.25, Jerry Stuckle wrote: >>>> Earlier C++ compilers required exactly this syntax. >>> >>> Wrong, wrong, wrong. All C compilers from the very beginning just >>> included whatever file was listed. >> >> s/compiler/runtime/; >> > > Wrong. Compilers. Header files have nothing to do with runtime. > >>>>> In the global namespace in a header the `using std::complex` can >>>>> lead to >>>>> unintended name collisions. >>>> >>>> The entire application code is not aware of namespaces. Probably the >>>> keyword "namespace" does not even exist once. As I already mentioned, it >>>> is quite old code. >>> >>> "namespace" has existed for at least 25 years. I'm not sure exactly >>> which standard had it first, but we were using it in the early 90's. >> >> All my complilers from the mid 90's can't deal with namespaces. Neither >> Borland supported them nor IBM VAC++ and AFAIR gcc 2.9.5 did not support >> it either. >> > > Sorry you had compilers which were not standards compliant. That does > not mean it wasn't part of the standard. > It's depends on what you define as C++ standard. Normally we tend to use the ISO C++ as a reference (1998 or later). The ARM document (where namespaces are described) is not considered "the" C++ standard. BTW, what was your compiler that implemented namespaces in the early 90's? As Marcel Mueller said, my compilers in those years didn't have support for namepaces (Borland/Microsoft) >> And well, from the release of a standard to the point where you can >> really use a feature are often years. I recently got complaints about >> C++11 code because still some common Linux Distros do not support it >> because they use gcc 4.7 which at least requires a compiler option and >> even with this option sometimes it does not work. >> > > Yes, it takes time for compiler developers to write code. Whether the > compiler is up to date with the standard or the distro includes a > standards-compliant compiler is immaterial to whether the item is part > of the standard or not. > >>> If >>> your code is older than that, then it probably needs rewriting. >> >> No, it is only about 15 years old. But some of the supported compilers >> did not know about namespaces at this time. >> >> >> Marcel > > It's not anyone else's fault that you were using non-standards compliant > compilers. Namespaces were in the standard, and there were compilers > supporting it. > -- Cholo Lennon Bs.As. ARG
[toc] | [prev] | [next] | [standalone]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Date | 2016-02-23 08:53 +1300 |
| Message-ID | <dj17aeFj7j6U8@mid.individual.net> |
| In reply to | #41112 |
Cholo Lennon wrote: > On 02/21/2016 10:44 PM, Jerry Stuckle wrote: >> On 2/21/2016 5:43 PM, Marcel Mueller wrote: >>> On 21.02.16 20.25, Jerry Stuckle wrote: >>>> >>>> "namespace" has existed for at least 25 years. I'm not sure exactly >>>> which standard had it first, but we were using it in the early 90's. >>> >>> All my complilers from the mid 90's can't deal with namespaces. Neither >>> Borland supported them nor IBM VAC++ and AFAIR gcc 2.9.5 did not support >>> it either. >>> >> >> Sorry you had compilers which were not standards compliant. That does >> not mean it wasn't part of the standard. >> > > It's depends on what you define as C++ standard. Normally we tend to use > the ISO C++ as a reference (1998 or later). The ARM document (where > namespaces are described) is not considered "the" C++ standard. There weren't any standards compliant compilers in the early 90s because there wasn't a standard! -- Ian Collins
[toc] | [prev] | [next] | [standalone]
| From | Cholo Lennon <chololennon@hotmail.com> |
|---|---|
| Date | 2016-02-22 17:03 -0300 |
| Message-ID | <nafphk$1oec$1@gioia.aioe.org> |
| In reply to | #41116 |
On 02/22/2016 04:53 PM, Ian Collins wrote: > Cholo Lennon wrote: >> On 02/21/2016 10:44 PM, Jerry Stuckle wrote: >>> On 2/21/2016 5:43 PM, Marcel Mueller wrote: >>>> On 21.02.16 20.25, Jerry Stuckle wrote: >>>>> >>>>> "namespace" has existed for at least 25 years. I'm not sure exactly >>>>> which standard had it first, but we were using it in the early 90's. >>>> >>>> All my complilers from the mid 90's can't deal with namespaces. Neither >>>> Borland supported them nor IBM VAC++ and AFAIR gcc 2.9.5 did not >>>> support >>>> it either. >>>> >>> >>> Sorry you had compilers which were not standards compliant. That does >>> not mean it wasn't part of the standard. >>> >> >> It's depends on what you define as C++ standard. Normally we tend to use >> the ISO C++ as a reference (1998 or later). The ARM document (where >> namespaces are described) is not considered "the" C++ standard. > > There weren't any standards compliant compilers in the early 90s because > there wasn't a standard! > Well, that was I was trying to say (in a complex manner btw) ;-) Regards -- Cholo Lennon Bs.As. ARG
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-22 15:16 -0500 |
| Message-ID | <nafq4s$kkd$1@jstuckle.eternal-september.org> |
| In reply to | #41116 |
On 2/22/2016 2:53 PM, Ian Collins wrote: > Cholo Lennon wrote: >> On 02/21/2016 10:44 PM, Jerry Stuckle wrote: >>> On 2/21/2016 5:43 PM, Marcel Mueller wrote: >>>> On 21.02.16 20.25, Jerry Stuckle wrote: >>>>> >>>>> "namespace" has existed for at least 25 years. I'm not sure exactly >>>>> which standard had it first, but we were using it in the early 90's. >>>> >>>> All my complilers from the mid 90's can't deal with namespaces. Neither >>>> Borland supported them nor IBM VAC++ and AFAIR gcc 2.9.5 did not >>>> support >>>> it either. >>>> >>> >>> Sorry you had compilers which were not standards compliant. That does >>> not mean it wasn't part of the standard. >>> >> >> It's depends on what you define as C++ standard. Normally we tend to use >> the ISO C++ as a reference (1998 or later). The ARM document (where >> namespaces are described) is not considered "the" C++ standard. > > There weren't any standards compliant compilers in the early 90s because > there wasn't a standard! > Just because there wasn't an ISO standard at the time doesn't mean there wasn't a standard. It started with Stroustrup's book. Modifications followed from that. People think that ISO is the only organization which can issue standards. Nothing is further from the truth. If they come out with a standard, it is generally recognized world-wide. But when they haven't, there can still be standards. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Date | 2016-02-22 21:38 +0100 |
| Message-ID | <nafrds$ph8$1@dont-email.me> |
| In reply to | #41121 |
On 22.02.2016 21:16, Jerry Stuckle wrote: > On 2/22/2016 2:53 PM, Ian Collins wrote: >>> >>> It's depends on what you define as C++ standard. Normally we tend to use >>> the ISO C++ as a reference (1998 or later). The ARM document (where >>> namespaces are described) is not considered "the" C++ standard. >> >> There weren't any standards compliant compilers in the early 90s because >> there wasn't a standard! >> > > Just because there wasn't an ISO standard at the time doesn't mean there > wasn't a standard. It started with Stroustrup's book. Modifications > followed from that. I agree that Bjarne's TCPPL and later Bjarne and Margaret's ARM (the Annotated Reference Manual) constituted the effective C++ standards at the time, before 1998, just as Brian and Dennis' TCPL constituted the effective C standard before C89/C90. Re existence of pre 1998 namespaces, my copy of the ARM is deep down in some unmarked box in an attic some miles from here, and likewise my copy of Visual C++ 1.5. Yes AFAIK I still have that. But given the relatively low accessibility of those items, and my generally vague memory, I can't say for sure. Oh, wait! Talk about bad memory, I forgot GOOGLE! Yay, Mr. Google found the following 1994 Dr Dobbs article in zero point 38 seconds: <url: http://www.drdobbs.com/cpp/c-namespaces/184409289> So, this should now be regarded as solved. C++ had namespaces at least as early as 1994. In that article Tom Penelli refers to them as “so new [a feature]”, so presumably they were a post ARM feature. As I recall the ARM was published in 1989. But that can of course also be checked with Mr. Google, who knows all. :) > People think that ISO is the only organization which can issue > standards. Nothing is further from the truth. If they come out with a > standard, it is generally recognized world-wide. But when they haven't, > there can still be standards. Yeah, right again. I remember having countless discussions about this with the late Erik Naggum (RIP., there is a Wikipedia page about him for those unfamiliar with the name), who insisted on very formal distinctions between formal standard, de facto standard and so on, more shades that I don't remember because it's never been an issue except with him. “Standard in Windows”, he cried, and would ask me to point him to the formal ISO standard that I referred to, which of course I didn't, although now, much later, I could point him to the 1995 ECMA standardization of the 16-bit Windows API, I guess. Anyway. The important thing about generally useful communication is to be understood, not to pedantically try to misconstrue every statement. Erik was right that precision matters wrt. technical stuff, and generally he was just right about most everything technical. But IMHO he went too far, too rigid. Cheers & hth., - Alf
[toc] | [prev] | [next] | [standalone]
| From | Cholo Lennon <chololennon@hotmail.com> |
|---|---|
| Date | 2016-02-22 17:50 -0300 |
| Message-ID | <nafsb3$4te$1@gioia.aioe.org> |
| In reply to | #41125 |
On 02/22/2016 05:38 PM, Alf P. Steinbach wrote: > On 22.02.2016 21:16, Jerry Stuckle wrote: >> On 2/22/2016 2:53 PM, Ian Collins wrote: >>>> >>>> It's depends on what you define as C++ standard. Normally we tend to >>>> use >>>> the ISO C++ as a reference (1998 or later). The ARM document (where >>>> namespaces are described) is not considered "the" C++ standard. >>> >>> There weren't any standards compliant compilers in the early 90s because >>> there wasn't a standard! >>> >> >> Just because there wasn't an ISO standard at the time doesn't mean there >> wasn't a standard. It started with Stroustrup's book. Modifications >> followed from that. > > I agree that Bjarne's TCPPL and later Bjarne and Margaret's ARM (the > Annotated Reference Manual) constituted the effective C++ standards at > the time, before 1998, just as Brian and Dennis' TCPL constituted the > effective C standard before C89/C90. > > Re existence of pre 1998 namespaces, my copy of the ARM is deep down in > some unmarked box in an attic some miles from here, and likewise my copy > of Visual C++ 1.5. Yes AFAIK I still have that. But given the relatively > low accessibility of those items, and my generally vague memory, I can't > say for sure. > > Oh, wait! Talk about bad memory, I forgot GOOGLE! Yay, Mr. Google found > the following 1994 Dr Dobbs article in zero point 38 seconds: > > <url: http://www.drdobbs.com/cpp/c-namespaces/184409289> > > So, this should now be regarded as solved. > > C++ had namespaces at least as early as 1994. > > In that article Tom Penelli refers to them as “so new [a feature]”, so > presumably they were a post ARM feature. As I recall the ARM was > published in 1989. But that can of course also be checked with Mr. > Google, who knows all. :) > Check this, namespaces are in the 1990 ARM document (is not the best source because the ARM is not there, but the chronology could be helpful) http://en.cppreference.com/w/cpp/language/history > >> People think that ISO is the only organization which can issue >> standards. Nothing is further from the truth. If they come out with a >> standard, it is generally recognized world-wide. But when they haven't, >> there can still be standards. > > Yeah, right again. > > I remember having countless discussions about this with the late Erik > Naggum (RIP., there is a Wikipedia page about him for those unfamiliar > with the name), who insisted on very formal distinctions between formal > standard, de facto standard and so on, more shades that I don't remember > because it's never been an issue except with him. “Standard in Windows”, > he cried, and would ask me to point him to the formal ISO standard that > I referred to, which of course I didn't, although now, much later, I > could point him to the 1995 ECMA standardization of the 16-bit Windows > API, I guess. Anyway. The important thing about generally useful > communication is to be understood, not to pedantically try to > misconstrue every statement. Erik was right that precision matters wrt. > technical stuff, and generally he was just right about most everything > technical. But IMHO he went too far, too rigid. > > > Cheers & hth., > > - Alf > -- Cholo Lennon Bs.As. ARG
[toc] | [prev] | [next] | [standalone]
| From | Cholo Lennon <chololennon@hotmail.com> |
|---|---|
| Date | 2016-02-22 18:09 -0300 |
| Message-ID | <naftej$6q1$1@gioia.aioe.org> |
| In reply to | #41127 |
On 02/22/2016 05:50 PM, Cholo Lennon wrote: > On 02/22/2016 05:38 PM, Alf P. Steinbach wrote: >> On 22.02.2016 21:16, Jerry Stuckle wrote: >>> On 2/22/2016 2:53 PM, Ian Collins wrote: >>>>> >>>>> It's depends on what you define as C++ standard. Normally we tend to >>>>> use >>>>> the ISO C++ as a reference (1998 or later). The ARM document (where >>>>> namespaces are described) is not considered "the" C++ standard. >>>> >>>> There weren't any standards compliant compilers in the early 90s >>>> because >>>> there wasn't a standard! >>>> >>> >>> Just because there wasn't an ISO standard at the time doesn't mean there >>> wasn't a standard. It started with Stroustrup's book. Modifications >>> followed from that. >> >> I agree that Bjarne's TCPPL and later Bjarne and Margaret's ARM (the >> Annotated Reference Manual) constituted the effective C++ standards at >> the time, before 1998, just as Brian and Dennis' TCPL constituted the >> effective C standard before C89/C90. >> >> Re existence of pre 1998 namespaces, my copy of the ARM is deep down in >> some unmarked box in an attic some miles from here, and likewise my copy >> of Visual C++ 1.5. Yes AFAIK I still have that. But given the relatively >> low accessibility of those items, and my generally vague memory, I can't >> say for sure. >> >> Oh, wait! Talk about bad memory, I forgot GOOGLE! Yay, Mr. Google found >> the following 1994 Dr Dobbs article in zero point 38 seconds: >> >> <url: http://www.drdobbs.com/cpp/c-namespaces/184409289> >> >> So, this should now be regarded as solved. >> >> C++ had namespaces at least as early as 1994. >> >> In that article Tom Penelli refers to them as “so new [a feature]”, so >> presumably they were a post ARM feature. As I recall the ARM was >> published in 1989. But that can of course also be checked with Mr. >> Google, who knows all. :) >> > > Check this, namespaces are in the 1990 ARM document (is not the best > source because the ARM is not there, but the chronology could be helpful) > > http://en.cppreference.com/w/cpp/language/history > > Reading again "The Design & Evolution of C++", chapter 17 "Namespaces", Stroustroup says the following: "Namespaces were voted into C++ at the Munich meeting in July 1993" >> >>> People think that ISO is the only organization which can issue >>> standards. Nothing is further from the truth. If they come out with a >>> standard, it is generally recognized world-wide. But when they haven't, >>> there can still be standards. >> >> Yeah, right again. >> >> I remember having countless discussions about this with the late Erik >> Naggum (RIP., there is a Wikipedia page about him for those unfamiliar >> with the name), who insisted on very formal distinctions between formal >> standard, de facto standard and so on, more shades that I don't remember >> because it's never been an issue except with him. “Standard in Windows”, >> he cried, and would ask me to point him to the formal ISO standard that >> I referred to, which of course I didn't, although now, much later, I >> could point him to the 1995 ECMA standardization of the 16-bit Windows >> API, I guess. Anyway. The important thing about generally useful >> communication is to be understood, not to pedantically try to >> misconstrue every statement. Erik was right that precision matters wrt. >> technical stuff, and generally he was just right about most everything >> technical. But IMHO he went too far, too rigid. >> >> >> Cheers & hth., >> >> - Alf >> > > -- Cholo Lennon Bs.As. ARG
[toc] | [prev] | [next] | [standalone]
| From | legalize+jeeves@mail.xmission.com (Richard) |
|---|---|
| Date | 2016-02-22 21:20 +0000 |
| Message-ID | <nafu2d$fhh$1@news.xmission.com> |
| In reply to | #41125 |
[Please do not mail me a copy of your followup]
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> spake the secret code
<nafrds$ph8$1@dont-email.me> thusly:
>C++ had namespaces at least as early as 1994.
SGI's MIPSpro 7.2 compiler had them in 1995
<http://techpubs.sgi.com/library/manuals/0000/007-0704-120/pdf/007-0704-120.pdf>
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
[toc] | [prev] | [next] | [standalone]
| From | Öö Tiib <ootiib@hot.ee> |
|---|---|
| Date | 2016-02-22 12:47 -0800 |
| Message-ID | <9b7206fa-55db-4b26-8cbf-cac75c7cb45f@googlegroups.com> |
| In reply to | #41121 |
On Monday, 22 February 2016 22:16:28 UTC+2, Jerry Stuckle wrote:
> On 2/22/2016 2:53 PM, Ian Collins wrote:
> > Cholo Lennon wrote:
> >> On 02/21/2016 10:44 PM, Jerry Stuckle wrote:
> >>> On 2/21/2016 5:43 PM, Marcel Mueller wrote:
> >>>> On 21.02.16 20.25, Jerry Stuckle wrote:
> >>>>>
> >>>>> "namespace" has existed for at least 25 years. I'm not sure exactly
> >>>>> which standard had it first, but we were using it in the early 90's.
> >>>>
> >>>> All my complilers from the mid 90's can't deal with namespaces. Neither
> >>>> Borland supported them nor IBM VAC++ and AFAIR gcc 2.9.5 did not
> >>>> support
> >>>> it either.
> >>>>
> >>>
> >>> Sorry you had compilers which were not standards compliant. That does
> >>> not mean it wasn't part of the standard.
> >>>
> >>
> >> It's depends on what you define as C++ standard. Normally we tend to use
> >> the ISO C++ as a reference (1998 or later). The ARM document (where
> >> namespaces are described) is not considered "the" C++ standard.
> >
> > There weren't any standards compliant compilers in the early 90s because
> > there wasn't a standard!
> >
>
> Just because there wasn't an ISO standard at the time doesn't mean there
> wasn't a standard. It started with Stroustrup's book. Modifications
> followed from that.
>
> People think that ISO is the only organization which can issue
> standards. Nothing is further from the truth. If they come out with a
> standard, it is generally recognized world-wide. But when they haven't,
> there can still be standards.
Can you name the mysterious compiler? There was lot of talk of it but
nothing supported it. First C++ that gave *warning* about usage of
'namespace' as variable name was CFront 3.0.3 released May 1994. It also
did not yet have 'namespace' implemented, instead the README told that:
The identifier names "mutable", "namespace", and "using" will
now trigger a warning when they are used as identifiers.
For example:
int namespace = 37;
This is because they are future keywords for the ANSI C++ language
namespace feature.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-22 16:18 -0500 |
| Message-ID | <naftq9$2at$1@jstuckle.eternal-september.org> |
| In reply to | #41126 |
On 2/22/2016 3:47 PM, Öö Tiib wrote: > On Monday, 22 February 2016 22:16:28 UTC+2, Jerry Stuckle wrote: >> On 2/22/2016 2:53 PM, Ian Collins wrote: >>> Cholo Lennon wrote: >>>> On 02/21/2016 10:44 PM, Jerry Stuckle wrote: >>>>> On 2/21/2016 5:43 PM, Marcel Mueller wrote: >>>>>> On 21.02.16 20.25, Jerry Stuckle wrote: >>>>>>> >>>>>>> "namespace" has existed for at least 25 years. I'm not sure exactly >>>>>>> which standard had it first, but we were using it in the early 90's. >>>>>> >>>>>> All my complilers from the mid 90's can't deal with namespaces. Neither >>>>>> Borland supported them nor IBM VAC++ and AFAIR gcc 2.9.5 did not >>>>>> support >>>>>> it either. >>>>>> >>>>> >>>>> Sorry you had compilers which were not standards compliant. That does >>>>> not mean it wasn't part of the standard. >>>>> >>>> >>>> It's depends on what you define as C++ standard. Normally we tend to use >>>> the ISO C++ as a reference (1998 or later). The ARM document (where >>>> namespaces are described) is not considered "the" C++ standard. >>> >>> There weren't any standards compliant compilers in the early 90s because >>> there wasn't a standard! >>> >> >> Just because there wasn't an ISO standard at the time doesn't mean there >> wasn't a standard. It started with Stroustrup's book. Modifications >> followed from that. >> >> People think that ISO is the only organization which can issue >> standards. Nothing is further from the truth. If they come out with a >> standard, it is generally recognized world-wide. But when they haven't, >> there can still be standards. > > Can you name the mysterious compiler? There was lot of talk of it but > nothing supported it. First C++ that gave *warning* about usage of > 'namespace' as variable name was CFront 3.0.3 released May 1994. It also > did not yet have 'namespace' implemented, instead the README told that: > > The identifier names "mutable", "namespace", and "using" will > now trigger a warning when they are used as identifiers. > For example: > > int namespace = 37; > > This is because they are future keywords for the ANSI C++ language > namespace feature. > IBM's Visual C++ compiler for OS/2 and Windows did, for one. I don't remember off hand what Linux compilers we used way back then. And IIRC, even Microsoft Visual C++ 6.something supported them. But I haven't used it for 15 years or more. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Öö Tiib <ootiib@hot.ee> |
|---|---|
| Date | 2016-02-22 13:51 -0800 |
| Message-ID | <4fe212b0-d444-43ed-98e9-89f1a5d39e21@googlegroups.com> |
| In reply to | #41129 |
On Monday, 22 February 2016 23:19:07 UTC+2, Jerry Stuckle wrote: > On 2/22/2016 3:47 PM, Öö Tiib wrote: > > On Monday, 22 February 2016 22:16:28 UTC+2, Jerry Stuckle wrote: > >> On 2/22/2016 2:53 PM, Ian Collins wrote: > >>> Cholo Lennon wrote: > >>>> On 02/21/2016 10:44 PM, Jerry Stuckle wrote: > >>>>> On 2/21/2016 5:43 PM, Marcel Mueller wrote: > >>>>>> On 21.02.16 20.25, Jerry Stuckle wrote: > >>>>>>> > >>>>>>> "namespace" has existed for at least 25 years. I'm not sure exactly > >>>>>>> which standard had it first, but we were using it in the early 90's. > >>>>>> > >>>>>> All my complilers from the mid 90's can't deal with namespaces. Neither > >>>>>> Borland supported them nor IBM VAC++ and AFAIR gcc 2.9.5 did not > >>>>>> support > >>>>>> it either. > >>>>>> > >>>>> > >>>>> Sorry you had compilers which were not standards compliant. That does > >>>>> not mean it wasn't part of the standard. > >>>>> > >>>> > >>>> It's depends on what you define as C++ standard. Normally we tend to use > >>>> the ISO C++ as a reference (1998 or later). The ARM document (where > >>>> namespaces are described) is not considered "the" C++ standard. > >>> > >>> There weren't any standards compliant compilers in the early 90s because > >>> there wasn't a standard! > >>> > >> > >> Just because there wasn't an ISO standard at the time doesn't mean there > >> wasn't a standard. It started with Stroustrup's book. Modifications > >> followed from that. > >> > >> People think that ISO is the only organization which can issue > >> standards. Nothing is further from the truth. If they come out with a > >> standard, it is generally recognized world-wide. But when they haven't, > >> there can still be standards. > > > > Can you name the mysterious compiler? There was lot of talk of it but > > nothing supported it. First C++ that gave *warning* about usage of > > 'namespace' as variable name was CFront 3.0.3 released May 1994. It also > > did not yet have 'namespace' implemented, instead the README told that: > > > > The identifier names "mutable", "namespace", and "using" will > > now trigger a warning when they are used as identifiers. > > For example: > > > > int namespace = 37; > > > > This is because they are future keywords for the ANSI C++ language > > namespace feature. > > > > IBM's Visual C++ compiler for OS/2 and Windows did, for one. I don't > remember off hand what Linux compilers we used way back then. IBM VisualAge C++ added namespace support 2003 AFAIK, at 2000 it did have templates but no namespaces. > > And IIRC, even Microsoft Visual C++ 6.something supported them. But I > haven't used it for 15 years or more. Yes, I remember it, it had first nice IDE from MS and come shortly after first working OS from MS (NT 4.0). It was released in 1998. So how you could use those early nineties?
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-02-22 16:57 -0500 |
| Message-ID | <nag03g$b68$1@jstuckle.eternal-september.org> |
| In reply to | #41133 |
On 2/22/2016 4:51 PM, Öö Tiib wrote: > On Monday, 22 February 2016 23:19:07 UTC+2, Jerry Stuckle wrote: >> On 2/22/2016 3:47 PM, Öö Tiib wrote: >>> On Monday, 22 February 2016 22:16:28 UTC+2, Jerry Stuckle wrote: >>>> On 2/22/2016 2:53 PM, Ian Collins wrote: >>>>> Cholo Lennon wrote: >>>>>> On 02/21/2016 10:44 PM, Jerry Stuckle wrote: >>>>>>> On 2/21/2016 5:43 PM, Marcel Mueller wrote: >>>>>>>> On 21.02.16 20.25, Jerry Stuckle wrote: >>>>>>>>> >>>>>>>>> "namespace" has existed for at least 25 years. I'm not sure exactly >>>>>>>>> which standard had it first, but we were using it in the early 90's. >>>>>>>> >>>>>>>> All my complilers from the mid 90's can't deal with namespaces. Neither >>>>>>>> Borland supported them nor IBM VAC++ and AFAIR gcc 2.9.5 did not >>>>>>>> support >>>>>>>> it either. >>>>>>>> >>>>>>> >>>>>>> Sorry you had compilers which were not standards compliant. That does >>>>>>> not mean it wasn't part of the standard. >>>>>>> >>>>>> >>>>>> It's depends on what you define as C++ standard. Normally we tend to use >>>>>> the ISO C++ as a reference (1998 or later). The ARM document (where >>>>>> namespaces are described) is not considered "the" C++ standard. >>>>> >>>>> There weren't any standards compliant compilers in the early 90s because >>>>> there wasn't a standard! >>>>> >>>> >>>> Just because there wasn't an ISO standard at the time doesn't mean there >>>> wasn't a standard. It started with Stroustrup's book. Modifications >>>> followed from that. >>>> >>>> People think that ISO is the only organization which can issue >>>> standards. Nothing is further from the truth. If they come out with a >>>> standard, it is generally recognized world-wide. But when they haven't, >>>> there can still be standards. >>> >>> Can you name the mysterious compiler? There was lot of talk of it but >>> nothing supported it. First C++ that gave *warning* about usage of >>> 'namespace' as variable name was CFront 3.0.3 released May 1994. It also >>> did not yet have 'namespace' implemented, instead the README told that: >>> >>> The identifier names "mutable", "namespace", and "using" will >>> now trigger a warning when they are used as identifiers. >>> For example: >>> >>> int namespace = 37; >>> >>> This is because they are future keywords for the ANSI C++ language >>> namespace feature. >>> >> >> IBM's Visual C++ compiler for OS/2 and Windows did, for one. I don't >> remember off hand what Linux compilers we used way back then. > > IBM VisualAge C++ added namespace support 2003 AFAIK, at 2000 it did > have templates but no namespaces. > VisualAge C++ for OS/2 and Windows didn't even exist in 2003. It had been dropped several years before that. I don't remember exactly when, though. >> >> And IIRC, even Microsoft Visual C++ 6.something supported them. But I >> haven't used it for 15 years or more. > > Yes, I remember it, it had first nice IDE from MS and come shortly after > first working OS from MS (NT 4.0). It was released in 1998. > > So how you could use those early nineties? > Visual C++ came out long before 1998. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.c++
csiph-web