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++ - <cNAME> header & namespace (Oh and stlport...)

The following is a small issue that have basic obvious work around but
I thought I'll say it anyway.

Currently, the library files that comes with the compiler implement
the C++ headers for C library by basically just including the C
equivlent. As it stands it's non-conformant because the declarations
and definitions are not within namespace std.

Now to change it, I know it's not as simple as just declaring
namespace std and then include the C header (I've read this somewhere
recently) (Ahha found it!)
http://groups.google.co.uk/groups?q=cstdio+include+stdio.h&hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&scoring=d&selm=MPG.1a95763364479f3a989c99%40news.clspco.adelphia.net&rnum=6
but it would be nice if this is corrected sometime :-)


Oh and if I use stlport, then the declarations and definitions are in
std and it works fine. However, if I specific the -A switch to the
compiler, I get the following error:
#   define __DFL_TMPL_PARAM( classname, defval ) class classname =
defval
 ^
\dm\stlport\stlport\.\stl/_config.h(370) : Preprocessor error:
'_STLP_DEFAULT_TYPE_PARAM' is already
 defined
--- errorlevel 1


KTC

-- 
Experience is a good school but the fees are high.
    - Heinrich Heine
Feb 21 2004