Hello,

I am still in the process of compiling LyX with DEC cxx compiler. It
seems that adding the cfoo headers from GNU libstdc++ gives good
results, but I have problems with namespaces.

The problem: stuff like ostream is used sometimes with std::,
sometimes without. While it might be OK with gcc, it is not with cxx
(and it does not make sense anyway). 

So I guess we need a solution to this. I see several:

1) add the proper 'using std::ostream' for all the objects like this
   that we use. The particular problem with ostream is that it is or
   is not in std:: depending on the header we use to declare it...

2) define a macro STD (or maybe _std_) which is set to NULL when we do
   not want to have namespaces. A problem with this is constructs
   like
        debugbuf(streambuf * b)
                : std::streambuf(), sb(b) {}
   where the compiler (gcc 2.8.1 here) does not understand correctly
   ": ::". This means that we will have to reorder initializations or
   other non-fun (TM) stuff.

Concerning using explicit namespaces and fun factor: I do not think
that using std::string or std::ostream all over the code is much fun,
and it seems to me that specifying 'using' in strategic places
still provides us with namespace protection for other classes defined
in headers. However, if Lars prefers option 2), that's OK with me.

JMarc

Reply via email to