Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| cxx: Warning: ../../../lyx-devel/src/support/lyxstring.h, line 101: type
|           qualifiers are meaningless in this declaration
|         typedef const reference const_reference;

Ok, I try with 
typedef value_type const & const_reference
instead. That might help.

| cxx: Error: ../../../lyx-devel/src/support/lyxstring.h, line 539: 
|           class "lyxstring::Srep" is inaccessible
|                         return new Srep(sz, s);

This one I am not sure about, could you try with
return new lyxstring::Srep(sz, s);
instead?
If that also does not work, try move the implementation of the func to
lyxstring.C.

| cxx: Error: ../../../lyx-devel/src/support/lyxstring.C, line 123: a nonstatic
|           member reference must be relative to a specific object
|         Assert(object->rep->ref < (1 << 8*sizeof(lyxstring::Srep::ref)) - 1);

One easy fix for this one:

        Assert(object->rep->ref < (1 << 8*sizeof(unsigned short)) - 1);
there is also another fix that might be better:
        Assert(object->rep->ref < (1 << 8*sizeof(object->rep->ref)) -1);

but I am not sure if this assert is really needed or if we should keep
it as short. My gut feeling says that it should be changed to unsigned
int. Ok, this is 2 bytes more for each unique string, but it will be
more obvious.

| cxx: Warning: ../../../lyx-devel/src/support/lyxstring.C, line 1139: pointless
|           comparison of unsigned integer with zero
|         if (!n) return (ii >= 0) ? ii : npos;

I am not completely sure what the correct fix is here, but for now I
will replace the line in error with:

if (!n) return npos;

and move that line in front of the size_type ii...

| cxx: Error: ../../../lyx-devel/src/support/lyxstring.C, line 1595: no
|           operator ">>" matches these operands
|             operand types are: istream >> char [1024]
|         is >> nome;

Hmm is is possble to be that strict? Ok... we can use a pointer in
stead... it is also possible that this will automatically be fixed
when the right include files are there (see below), if that is the
case it should be changed back to char nome[1024].

The operator then looks like this:
istream & operator>>(istream & is, lyxstring & s)
{
        // very bad solution
        char * nome = new char[1024];
        is >> nome;
        lyxstring tmp(nome);
        delete [] nome;
        if (!tmp.empty()) s = tmp;
        return is;
}

As you can see this is a very bad solution (it even says so), but it
is simple. But it can fail... better implementations are welcome.

| cxx: Error: ../../../lyx-devel/src/support/lyxstring.C, line 1603: incomplete
|           type is not allowed
|         return o.write(s.data(), s.length());

Is there a missing <ostream> perhaps?

| cxx: Error: ../../../lyx-devel/src/support/lyxstring.C, line 1612: incomplete
|           type is not allowed
|         while(is) {

Missing <istream> perhaps?

Yes, a conformant compiler has ostream in <ostream> and istream in
<istream>, this is unfortunately not the case with egcs.

We can add checks for these in configure. HAVE_OSTREAM and
HAVE_ISTREAM


| cxx: Error: ../../../lyx-devel/src/support/lyxstring.C, line 1613: no
|           operator ">>" matches these operands
|             operand types are: istream >> char
|                 is >> tmp;

I think this is solved when we get the correct include files.

        Lgb

Reply via email to