From: Alexandre T. <kt...@fr...> - 2003-03-10 21:11:46
|
Le lundi, 10 mar 2003, =E0 19:20 Europe/Paris, Michael Hohmuth a =E9crit = : > Grzegorz Jakacki <ja...@he...> writes: > >> You have been added to the project. Currently Alexandre Tolmos is >> finishing his commits wrt. gcc-3.x, there will be an annoucement once = =20 >> he >> is done. Before this happens you may want to contact me if you think =20 >> you >> need any help on branching/merging. > > Thanks. > > I don't think I need any help with merging, but I would like to have > some feedback. > > I observed that in the current CVS version (which supposedly already > contains some or all of the previous GCC3 work), there appear some > "using namespace std" declarations in header files. This, to my eyes, > is bad style. I am working on a project that uses OpenC++ as a > library, and there it potentially ``hurts'' if a header file imports > the whole std namespace into the global namespace. Sorry, I'm responsible for that global namespace pollution :) I recognize it's brute force but it was the simplest (and dirtiest) way =20 of promoting symbols from the standard library. In the case of of stand =20 alone application it does not hurt but if you intend to use Oc++ as =20 library then it's not the correct way. > So, once Alexandre is finished, I would like to undo these changes and > instead revert to the style used in my patch: The "using namespace > std" declarations are only allowed to appear in .cc files, and .h > files reference std symbols using qualified names. Actually I should have put the "using namespace std" declarations =20 within the "Opencxx" namespace itself; then none of the symbols from =20 the standard library would have been promoted in the global namespace... > There also is the issue of naming header files coming from standard > C. In my original patch, they are included as, for example, <cstring> > instead of <string.h>, whereas the current CVS version uses the > latter, older style. Here, I am planning to leave it at the CVS > version's style, because I think that it might be more portable. I think we should move to the new standard headers but I don't know if =20 it would still compile on Win32. Btw, Grzegorz has got problems compiling with Gcc 3.2.1 (errors in =20 "buffer.cc" pertaining to the "placement new" operator). On my Mac I =20 only have Gcc 3.1. Did you encounter such problems with Gcc 3.2? Alexandre. ------------------------------------------------------------------------=20 - Alexandre Tolmos E-mail:=A0...@fr... ICQ: 92964905 ------------------------------------------------------------------------=20 - "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn." ------------------------------------------------------------------------=20 - |