I see that with stlport now I can use "using std::cout;", "using std::endl;",
and such like. But "using namespace std;" still fails. I vaguely remember it
has been a problem for quite some time. Anyone knows when this problem could be
solved?
Best regards,
Wu Yongwei

I had this problem too, but it went away when I downloaded and used the
latest compiler beta.
Also I used the latest stlport.
Nic Tiger.
"Wu Yongwei" <adah netstd.com> сообщил/сообщила в новостях следующее:
news:b3n7ck$2f45$1 digitaldaemon.com...

I see that with stlport now I can use "using std::cout;", "using

and such like. But "using namespace std;" still fails. I vaguely

has been a problem for quite some time. Anyone knows when this problem

It would be great if this problem could be solved without having to use
the stlport, since it's only awailable for 32-bit compiling.
Hans
Nic Tiger wrote:

I had this problem too, but it went away when I downloaded and used the
latest compiler beta.
Also I used the latest stlport.
Nic Tiger.
"Wu Yongwei" <adah netstd.com> сообщил/сообщила в новостях следующее:
news:b3n7ck$2f45$1 digitaldaemon.com...

I see that with stlport now I can use "using std::cout;", "using

std::endl;",

and such like. But "using namespace std;" still fails. I vaguely

remember it

has been a problem for quite some time. Anyone knows when this problem

I see that with stlport now I can use "using std::cout;", "using std::endl;",
and such like. But "using namespace std;" still fails. I vaguely remember it
has been a problem for quite some time. Anyone knows when this problem could
be
solved?
Best regards,
Wu Yongwei

Are you sure about that? Check it out. I have version 8.32.17n, which I
downloaded on Feb. 20, 2003. I believe it is the latest
version.
"using namespace std;" and "using std::cout" work, but "using std::endl;"
does not. I.e., you can use it, but you will get a
compile error: "Error: template endl<> is not instantiated", unless you also
say something like:
cout << "Hello World" << std::endl;
but then it would be unnecessary to say "using std::endl;" To save a lot of
frustration use: '\n' unless you have a special reason
for using "endl".
Scott Meyers wrote an article for C++ Report, December, 1995, "The little
endl that couldn't" where he advised against the
gratuitous use of endl. You can find the article at:
http://www.aristeia.com/publications_frames.html
Jim Jennings

Not that I'm defending Scott, but he concludes that there is no real basis to
generally avoid using std::endl with the standard out streams
(w)cout/(w)cerr/(w)clog.
The problem with std:endl and "using std::endl" is a bug that is under review,
and while '\n' is a reasonable fix, it does not help in the instance where the
stream needs to be flushed. Any templatized use of the applicator/manipulator
pattern combined with the using declaration will fail. This includes std::endl
and std::flush.
In the rare instances that using std::endl appear, I tend to do:
#if defined (BROKEN_USING_DECLARATION)
# define endl std::endl
#else
using std::endl;
#endif
Richard

Not that I'm defending Scott, but he concludes that there is no real basis to
generally avoid using std::endl with the standard out streams
(w)cout/(w)cerr/(w)clog.

He said that there is no reason to use it either -- since the standard calls
for unbuffered cout, except that it is easier to type
than '\n'. He is against endl because "it is one of my pet peeves". But as you
say there is no reason to avoid it anymore.
Providing compilers comply with standard. That's why he took it out of
"Effective C++".

The problem with std:endl and "using std::endl" is a bug that is under review,
and while '\n' is a reasonable fix, it does not help in the instance where the
stream needs to be flushed. Any templatized use of the applicator/manipulator
pattern combined with the using declaration will fail. This includes std::endl
and std::flush.
In the rare instances that using std::endl appear, I tend to do:
#if defined (BROKEN_USING_DECLARATION)
# define endl std::endl
#else
using std::endl;
#endif

command line? I have your "#if defined ...." in a test source file, and have
tried the flag:
-D #define BROKEN_USING_DECLARATION
with and without the parentheses when compiling. I get no complaint, but it
doesn't take, either. I guess my question is: how do I
turn the define on for dmc, and off for another compiler? Edit the header file
every time? I am using dmc almost exclusively now,
but just in case. And where can one fine some examples of how the compiler
flags work? I cannot figure them out.
Jim J

The way to specify command line defines is:
-DBROKEN_USING_DECLARATION
and if you need to specify a value, it is:
-DBROKEN_USING_DECLARATION=1
This should be there in the documentation, somewhere.
- Rajiv
"Jim Jennings" <jwjenn mindspring.com> wrote in message
news:b415lj$2is1$1 digitaldaemon.com...

The way to specify command line defines is:
-DBROKEN_USING_DECLARATION
and if you need to specify a value, it is:
-DBROKEN_USING_DECLARATION=1
This should be there in the documentation, somewhere.
- Rajiv

Rajiv,
OK, it works. I would swear that I tried that, and it didn't work. I must be
spooked.
Yes, it is in the documentation. But usually I have only a vague idea what the
exact form should be.
I.e., -Dmacro[=text] what does that mean? Should I enter:
-Dmacro[=BROKEN_USING_DECLARATION] ? I know that is wrong.
-D[BROKEN_USING_DECLARATION] ? well, I know what [ . . . ] means.
-D=BROKEN_USING_DECLARATION ?
-D=#define BROKEN_USING_DECLARATION ?
-DBROKEN_USING_DECLARATION =true (or on, yes, uh-huh!)
-DDominus vobiscum.
And I can think of several more permutations and combinations (but never the
right one) Is the first commandment
of Unix documentation "Thou shalt never give an example!"? I hate to keep
asking these neophyte questions.
Jim J

The way to specify command line defines is:
-DBROKEN_USING_DECLARATION
and if you need to specify a value, it is:
-DBROKEN_USING_DECLARATION=1
This should be there in the documentation, somewhere.
- Rajiv

Rajiv,
OK, it works. I would swear that I tried that, and it didn't work. I must

Yes, it is in the documentation. But usually I have only a vague idea what

The way to specify command line defines is:
-DBROKEN_USING_DECLARATION
and if you need to specify a value, it is:
-DBROKEN_USING_DECLARATION=1
This should be there in the documentation, somewhere.
- Rajiv

Rajiv,
OK, it works. I would swear that I tried that, and it didn't work. I must be
spooked.
Yes, it is in the documentation. But usually I have only a vague idea what the
exact form should be.
I.e., -Dmacro[=text] what does that mean? Should I enter:
-Dmacro[=BROKEN_USING_DECLARATION] ? I know that is wrong.
-D[BROKEN_USING_DECLARATION] ? well, I know what [ . . . ] means.
-D=BROKEN_USING_DECLARATION ?
-D=#define BROKEN_USING_DECLARATION ?
-DBROKEN_USING_DECLARATION =true (or on, yes, uh-huh!)
-DDominus vobiscum.
And I can think of several more permutations and combinations (but never the
right one) Is the first commandment
of Unix documentation "Thou shalt never give an example!"? I hate to keep
asking these neophyte questions.
Jim J

Richard,
Just now saw your post.
I downloaded STLport-4.5-0119. I do not see a makefile for Digital Mars,
however. I have read the Install instructions quickly, and it seems
complicated to me. Can you give me some instructions? Shall I query
Christof? Or just wait until a set of DM instructions are published? I can
survive the "endl" bug for awhile longer.
Jim J.
"Richard Grant" <fractal clark.net> wrote in message
news:b4iprg$bg7$1 digitaldaemon.com...

Richard,
OK, I got the beta, and using std::endl; works. I had downloaded the
zip some time ago, but did not know what to do with it. I did not realize
that scppn.exe was the compiler. After your message, the dawn broke.
I'm way down on the learning curve, but I really like the compiler. It
is very fast, with smaller .exe files.
Thanks very much for the tip.
Jim
"Richard Grant" <fractal clark.net> wrote in message
news:b4pf8q$7if$1 digitaldaemon.com...

In article <b4oog5$2p11$1 digitaldaemon.com>, Jim Jennings says...

Richard,
Just now saw your post.
I downloaded STLport-4.5-0119. I do not see a makefile for Digital Mars,