bug-ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ddd/MString.h problems in 3.3 with Solaris C++ compiler, liberty ins


From: bug-ddd
Subject: Re: ddd/MString.h problems in 3.3 with Solaris C++ compiler, liberty install problems
Date: Sun, 4 Mar 2001 10:33:51 -0600
User-agent: Mutt/1.1.12i

On Sat, Mar 03, 2001 at 11:04:03AM -0600, Albert Chin-A-Young wrote:
> On Fri, Feb 23, 2001 at 02:45:22PM +0000, Arnaud Desitter wrote:
> > > I'm not sure about this: the Sun CC message explicitly stated that the
> > > `text' parameter was erroneous.  
> > > 
> > > Also, this change would have to be applied to the next N constructors
> > > as well (which didn't report any problems).
> > > 
> > > Finally, it risks to introduce new errors on systems where
> > > `XmStringCharSet' is not defined as a `char *' or `const char *'.
> > > 
> > 
> > My mistake ! To redeem myself, I provide a patch below that fixes
> > the problem. This may be due to an weird interaction between operator
> > overloading and default parameter.
> 
> Ok, the patch below works! Note that the patch is reversed.

Well, I spoke too soon. I didn't patch the original MString.h but my
patched copy. I just patched the original and receive the following
error:

CC -DHAVE_CONFIG_H -I. -I. -I. -I./.. -I/opt/TWWfsw/xpm/include
-I/usr/openwin/include  -I/opt/TWWfsw/readline4/include   -DNDEBUG -xs
-xO2 -xtarget=generic    -c converters.C
"converters.C", line 551: Error: Could not find a match for
MString::MString(subString, string).
1 Error(s) detected.

> > --- ddd-3.3/ddd/MString.h       Fri Feb 23 14:28:34 2001
> > +++ ddd-3.3-1/ddd/MString.h     Mon Dec 11 12:21:47 2000
> > @@ -52,12 +52,7 @@
> >  
> >  public:
> >      // Constructors
> > -    MString():
> > -       _mstring(XmStringCreateLtoR((char*)"", MSTRING_DEFAULT_CHARSET) )
> > -    {
> > -       assert(OK());
> > -    }
> > -    MString(const char *text ,
> > +    MString(const char *text = "",
> >             XmStringCharSet charset = MSTRING_DEFAULT_CHARSET):
> >         _mstring(text ? XmStringCreateLtoR((char *)text, charset) : 0)
> >      {

-- 
albert chin (address@hidden)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]