www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - using std::endl; doesn't work (for me).

↑ ↓ ← "James W. Jennnings" <jwjenn mindspring.com> writes:
I just now tried compiling several source C++ files that had "using
std::endl;" in them, and then just plain endl when I output a line. I got an
error message everywhere I used "endl":
    Error: template endl<> is not instantiated.

When I change the code to "std::endl" (or '\n' , of course) it works fine.
I am using a -I\dm\stlport\stlport flag, and all the other using ...
statements work OK.
BTW these files have all compiled with Borland, g++, and mingGW without any
endl complaints.
Jim Jennings
Feb 20 2003
↑ ↓ → Richard Grant <fractal clark.net> writes:
In article <b33r4v$7qc$1 digitaldaemon.com>, James W. Jennnings says...
I just now tried compiling several source C++ files that had "using
std::endl;" in them, and then just plain endl when I output a line. I got an
error message everywhere I used "endl":
    Error: template endl<> is not instantiated.

I've been keeping an eye on that one. I think it has something to do with the "inline" directive and template functions. Walter has some examples, and when next beta appears I'll look at it again. Richard
Feb 20 2003