Re: Cannot compile. Latest in trunk
On Fri, Jan 19, 2007 at 07:31:45PM +0100, Andre' Poenitz wrote: string a(); is a declaration of a function called 'a' taking no argument and returning a string. Hmpf... and everyone knew already. I was pretty sure I was up-to-date when writng this mail. Andre'
Re: Cannot compile. Latest in trunk
On Fri, Jan 19, 2007 at 07:31:45PM +0100, Andre' Poenitz wrote: > string a(); > > is a declaration of a function called 'a' taking no argument and > returning a string. Hmpf... and everyone knew already. I was pretty sure I was up-to-date when writng this mail. Andre'
Re: Cannot compile. Latest in trunk
On Tue, Jan 16, 2007 at 04:52:00PM +0100, Kornel Benko wrote: It is very fishy here. If I replace the call with: string a(); Buffer buffer(a, false); then it compiles. On the other hand string a(); string a(); is a declaration of a function called 'a' taking no argument and returning a string. Otoh, string a(); and string a; produce the same object, the former is only more verbose and likely to waste cycles. Andre'
Re: Cannot compile. Latest in trunk
On Tue, Jan 16, 2007 at 04:52:00PM +0100, Kornel Benko wrote: > It is very fishy here. > If I replace the call with: > string a(""); > Buffer buffer(a, false); > then it compiles. > > On the other hand > string a(); string a(); is a declaration of a function called 'a' taking no argument and returning a string. Otoh, string a(""); and string a; produce the same object, the former is only more verbose and likely to waste cycles. Andre'
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. Kornel -- Kornel Benko [EMAIL PROTECTED] Index: src/CutAndPaste.C === --- src/CutAndPaste.C (revision 16705) +++ src/CutAndPaste.C (working copy) @@ -328,7 +328,7 @@ void putClipboard(ParagraphList const paragraphs, textclass_type textclass, docstring const plaintext) { - Buffer buffer(string(), false); + Buffer buffer(string(), false); buffer.setUnnamed(true); buffer.paragraphs() = paragraphs; buffer.params().textclass = textclass; @@ -671,7 +671,7 @@ if (theClipboard().hasLyXContents()) { string lyx = theClipboard().getAsLyX(); if (!lyx.empty()) { - Buffer buffer(string(), false); + Buffer buffer(string(), false); buffer.setUnnamed(true); if (buffer.readString(lyx)) { recordUndo(cur); pgp9bMUaGovRL.pgp Description: PGP signature
Re: Cannot compile. Latest in trunk
Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. But this is not the good fix ;-) I think the missing string header was the problem. Try again. Abdel.
Re: Cannot compile. Latest in trunk
Abdelrazak Younes wrote: Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. But this is not the good fix ;-) Indeed not. string() should work even in older gcc versions. I think the missing string header was the problem. I don't think so. Otherwise it would have complained about docstring, too. Georg
Re: Cannot compile. Latest in trunk
Kornel == Kornel Benko [EMAIL PROTECTED] writes: Kornel Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Kornel Attached cures it. How come string() is needed? I thought we had plenty of these string() constructs. JMarc
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 15:34 schrieb Abdelrazak Younes: Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. But this is not the good fix ;-) I think the missing string header was the problem. Try again. Hmm... still the same. if g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost -W -Wall -I/usr/X11R6/include -g -O -MT CutAndPaste.o -MD -MP -MF .deps/CutAndPaste.Tpo -c -o CutAndPaste.o CutAndPaste.C; \ then mv -f .deps/CutAndPaste.Tpo .deps/CutAndPaste.Po; else rm -f .deps/CutAndPaste.Tpo; exit 1; fi CutAndPaste.C: In function `void lyx::unnamed::putClipboard(const lyx::ParagraphList, unsigned int, const lyx::docstring)': CutAndPaste.C:333: error: type specifier omitted for parameter CutAndPaste.C:333: error: syntax error before `false' CutAndPaste.C:334: error: request for member `setUnnamed' in ` lyx::unnamed::buffer', which is of non-aggregate type `lyx::Buffer ()(...) ' ... Kornel -- Kornel Benko [EMAIL PROTECTED] pgpeR0oPlq3Dx.pgp Description: PGP signature
Re: Cannot compile. Latest in trunk
Georg Baum wrote: Abdelrazak Younes wrote: Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. But this is not the good fix ;-) Indeed not. string() should work even in older gcc versions. I think the missing string header was the problem. I don't think so. Otherwise it would have complained about docstring, too. Indeed... It's probably the std::xxx declaration which were in the lyx namespace. This is known to fail for mingw for example. I've fixed that. Abdel.
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 15:46 schrieb Abdelrazak Younes: Georg Baum wrote: Abdelrazak Younes wrote: Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. But this is not the good fix ;-) Indeed not. string() should work even in older gcc versions. I think the missing string header was the problem. I don't think so. Otherwise it would have complained about docstring, too. Indeed... It's probably the std::xxx declaration which were in the lyx namespace. This is known to fail for mingw for example. I've fixed that. But it's still not compilable. if g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost -W -Wall -I/usr/X11R6/include -g -O -MT CutAndPaste.o -MD -MP -MF .deps/CutAndPaste.Tpo -c -o CutAndPaste.o CutAndPaste.C; \ then mv -f .deps/CutAndPaste.Tpo .deps/CutAndPaste.Po; else rm -f .deps/CutAndPaste.Tpo; exit 1; fi CutAndPaste.C: In function `void lyx::unnamed::putClipboard(const lyx::ParagraphList, unsigned int, const lyx::docstring)': CutAndPaste.C:332: error: type specifier omitted for parameter CutAndPaste.C:332: error: syntax error before `false' CutAndPaste.C:333: error: request for member `setUnnamed' in ` lyx::unnamed::buffer', which is of non-aggregate type `lyx::Buffer ()(...) ' C regards Kornel -- Kornel Benko [EMAIL PROTECTED] pgpV6KIlQ2wXT.pgp Description: PGP signature
Re: Cannot compile. Latest in trunk
Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:46 schrieb Abdelrazak Younes: Georg Baum wrote: Abdelrazak Younes wrote: Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. But this is not the good fix ;-) Indeed not. string() should work even in older gcc versions. I think the missing string header was the problem. I don't think so. Otherwise it would have complained about docstring, too. Indeed... It's probably the std::xxx declaration which were in the lyx namespace. This is known to fail for mingw for example. I've fixed that. But it's still not compilable. if g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost -W -Wall -I/usr/X11R6/include -g -O -MT CutAndPaste.o -MD -MP -MF .deps/CutAndPaste.Tpo -c -o CutAndPaste.o CutAndPaste.C; \ then mv -f .deps/CutAndPaste.Tpo .deps/CutAndPaste.Po; else rm -f .deps/CutAndPaste.Tpo; exit 1; fi CutAndPaste.C: In function `void lyx::unnamed::putClipboard(const lyx::ParagraphList, unsigned int, const lyx::docstring)': CutAndPaste.C:332: error: type specifier omitted for parameter CutAndPaste.C:332: error: syntax error before `false' hum, could it be because of the 'explicit' in: explicit Buffer(std::string const file, bool b = false); ??? Abdel.
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 16:32 schrieb Abdelrazak Younes: Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:46 schrieb Abdelrazak Younes: Georg Baum wrote: Abdelrazak Younes wrote: Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. But this is not the good fix ;-) Indeed not. string() should work even in older gcc versions. I think the missing string header was the problem. I don't think so. Otherwise it would have complained about docstring, too. Indeed... It's probably the std::xxx declaration which were in the lyx namespace. This is known to fail for mingw for example. I've fixed that. But it's still not compilable. if g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost -W -Wall -I/usr/X11R6/include -g -O -MT CutAndPaste.o -MD -MP -MF .deps/CutAndPaste.Tpo -c -o CutAndPaste.o CutAndPaste.C; \ then mv -f .deps/CutAndPaste.Tpo .deps/CutAndPaste.Po; else rm -f .deps/CutAndPaste.Tpo; exit 1; fi CutAndPaste.C: In function `void lyx::unnamed::putClipboard(const lyx::ParagraphList, unsigned int, const lyx::docstring)': CutAndPaste.C:332: error: type specifier omitted for parameter CutAndPaste.C:332: error: syntax error before `false' hum, could it be because of the 'explicit' in: explicit Buffer(std::string const file, bool b = false); ??? It is very fishy here. If I replace the call with: string a(); Buffer buffer(a, false); then it compiles. On the other hand string a(); Buffer buffer(a, false); yields to CutAndPaste.C:676: error: no matching function for call to `lyx::Buffer::Buffer (std::string ()(), bool)' buffer.h:73: error: candidates are: lyx::Buffer::Buffer(const lyx::Buffer) buffer.h:92: error: lyx::Buffer::Buffer(const std::string, bool) regards Kornel -- Kornel Benko [EMAIL PROTECTED] pgpLYZ9Vo3qND.pgp Description: PGP signature
Re: Cannot compile. Latest in trunk
Kornel Benko [EMAIL PROTECTED] writes: It is very fishy here. If I replace the call with: string a(); Buffer buffer(a, false); then it compiles. On the other hand string a(); Buffer buffer(a, false); yields to CutAndPaste.C:676: error: no matching function for call to `lyx::Buffer::Buffer (std::string ()(), bool)' buffer.h:73: error: candidates are: lyx::Buffer::Buffer(const lyx::Buffer) buffer.h:92: error: lyx::Buffer::Buffer(const std::string, bool) That's not fishy at all. string a(); defines a variable a and initializes it with . The same thing is achieved more elegantly and less expensively with: string a; By way of contrast, string a(); is a declaration of a function a that takes no arguments and returns a string... If you look a little closely at the error message, you'll see that the compiler is even trying to tell you that. Regards, Angus
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 16:52 schrieb Kornel Benko: It is very fishy here. If I replace the call with: string a(); Buffer buffer(a, false); then it compiles. On the other hand string a(); This is a function declaration of a function 'a' returning a string. What you want is string a; and I am sure it would work. Georg
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 19:41 schrieb Angus Leeming: That's not fishy at all. string a(); defines a variable a and initializes it with . The same thing is achieved more elegantly and less expensively with: string a; By way of contrast, string a(); is a declaration of a function a that takes no arguments and returns a string... Of course you are right. Now I feel very unconfortable. Kornel -- Kornel Benko [EMAIL PROTECTED] pgpkWxT9IOUdR.pgp Description: PGP signature
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. Kornel -- Kornel Benko [EMAIL PROTECTED] Index: src/CutAndPaste.C === --- src/CutAndPaste.C (revision 16705) +++ src/CutAndPaste.C (working copy) @@ -328,7 +328,7 @@ void putClipboard(ParagraphList const & paragraphs, textclass_type textclass, docstring const & plaintext) { - Buffer buffer(string(), false); + Buffer buffer(string(""), false); buffer.setUnnamed(true); buffer.paragraphs() = paragraphs; buffer.params().textclass = textclass; @@ -671,7 +671,7 @@ if (theClipboard().hasLyXContents()) { string lyx = theClipboard().getAsLyX(); if (!lyx.empty()) { - Buffer buffer(string(), false); + Buffer buffer(string(""), false); buffer.setUnnamed(true); if (buffer.readString(lyx)) { recordUndo(cur); pgp9bMUaGovRL.pgp Description: PGP signature
Re: Cannot compile. Latest in trunk
Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. But this is not the good fix ;-) I think the missing header was the problem. Try again. Abdel.
Re: Cannot compile. Latest in trunk
Abdelrazak Younes wrote: > Kornel Benko wrote: >> Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: >> >> Attached cures it. > > But this is not the good fix ;-) Indeed not. string() should work even in older gcc versions. > I think the missing header was the problem. I don't think so. Otherwise it would have complained about docstring, too. Georg
Re: Cannot compile. Latest in trunk
> "Kornel" == Kornel Benko <[EMAIL PROTECTED]> writes: Kornel> Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Kornel> Attached cures it. How come string("") is needed? I thought we had plenty of these string() constructs. JMarc
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 15:34 schrieb Abdelrazak Younes: > Kornel Benko wrote: > > Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: > > > > Attached cures it. > > But this is not the good fix ;-) > I think the missing header was the problem. > > Try again. Hmm... still the same. if g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost -W -Wall -I/usr/X11R6/include -g -O -MT CutAndPaste.o -MD -MP -MF ".deps/CutAndPaste.Tpo" -c -o CutAndPaste.o CutAndPaste.C; \ then mv -f ".deps/CutAndPaste.Tpo" ".deps/CutAndPaste.Po"; else rm -f ".deps/CutAndPaste.Tpo"; exit 1; fi CutAndPaste.C: In function `void lyxputClipboard(const lyx::ParagraphList&, unsigned int, const lyx::docstring&)': CutAndPaste.C:333: error: type specifier omitted for parameter CutAndPaste.C:333: error: syntax error before `false' CutAndPaste.C:334: error: request for member `setUnnamed' in ` lyxbuffer', which is of non-aggregate type `lyx::Buffer ()(...) ' ... Kornel -- Kornel Benko [EMAIL PROTECTED] pgpeR0oPlq3Dx.pgp Description: PGP signature
Re: Cannot compile. Latest in trunk
Georg Baum wrote: Abdelrazak Younes wrote: Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. But this is not the good fix ;-) Indeed not. string() should work even in older gcc versions. I think the missing header was the problem. I don't think so. Otherwise it would have complained about docstring, too. Indeed... It's probably the std::xxx declaration which were in the lyx namespace. This is known to fail for mingw for example. I've fixed that. Abdel.
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 15:46 schrieb Abdelrazak Younes: > Georg Baum wrote: > > Abdelrazak Younes wrote: > > > >> Kornel Benko wrote: > >>> Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: > >>> > >>> Attached cures it. > >> But this is not the good fix ;-) > > > > Indeed not. string() should work even in older gcc versions. > > > >> I think the missing header was the problem. > > > > I don't think so. Otherwise it would have complained about docstring, too. > > Indeed... It's probably the std::xxx declaration which were in the lyx > namespace. This is known to fail for mingw for example. > I've fixed that. But it's still not compilable. if g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost -W -Wall -I/usr/X11R6/include -g -O -MT CutAndPaste.o -MD -MP -MF ".deps/CutAndPaste.Tpo" -c -o CutAndPaste.o CutAndPaste.C; \ then mv -f ".deps/CutAndPaste.Tpo" ".deps/CutAndPaste.Po"; else rm -f ".deps/CutAndPaste.Tpo"; exit 1; fi CutAndPaste.C: In function `void lyxputClipboard(const lyx::ParagraphList&, unsigned int, const lyx::docstring&)': CutAndPaste.C:332: error: type specifier omitted for parameter CutAndPaste.C:332: error: syntax error before `false' CutAndPaste.C:333: error: request for member `setUnnamed' in ` lyxbuffer', which is of non-aggregate type `lyx::Buffer ()(...) ' C regards Kornel -- Kornel Benko [EMAIL PROTECTED] pgpV6KIlQ2wXT.pgp Description: PGP signature
Re: Cannot compile. Latest in trunk
Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:46 schrieb Abdelrazak Younes: Georg Baum wrote: Abdelrazak Younes wrote: Kornel Benko wrote: Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: Attached cures it. But this is not the good fix ;-) Indeed not. string() should work even in older gcc versions. I think the missing header was the problem. I don't think so. Otherwise it would have complained about docstring, too. Indeed... It's probably the std::xxx declaration which were in the lyx namespace. This is known to fail for mingw for example. I've fixed that. But it's still not compilable. if g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost -W -Wall -I/usr/X11R6/include -g -O -MT CutAndPaste.o -MD -MP -MF ".deps/CutAndPaste.Tpo" -c -o CutAndPaste.o CutAndPaste.C; \ then mv -f ".deps/CutAndPaste.Tpo" ".deps/CutAndPaste.Po"; else rm -f ".deps/CutAndPaste.Tpo"; exit 1; fi CutAndPaste.C: In function `void lyxputClipboard(const lyx::ParagraphList&, unsigned int, const lyx::docstring&)': CutAndPaste.C:332: error: type specifier omitted for parameter CutAndPaste.C:332: error: syntax error before `false' hum, could it be because of the 'explicit' in: explicit Buffer(std::string const & file, bool b = false); ??? Abdel.
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 16:32 schrieb Abdelrazak Younes: > Kornel Benko wrote: > > Am Dienstag, 16. Januar 2007 15:46 schrieb Abdelrazak Younes: > >> Georg Baum wrote: > >>> Abdelrazak Younes wrote: > >>> > Kornel Benko wrote: > > Am Dienstag, 16. Januar 2007 15:09 schrieb Kornel Benko: > > > > Attached cures it. > But this is not the good fix ;-) > >>> Indeed not. string() should work even in older gcc versions. > >>> > I think the missing header was the problem. > >>> I don't think so. Otherwise it would have complained about docstring, too. > >> Indeed... It's probably the std::xxx declaration which were in the lyx > >> namespace. This is known to fail for mingw for example. > >> I've fixed that. > > > > But it's still not compilable. > > > > if g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost -W -Wall > > -I/usr/X11R6/include -g -O -MT CutAndPaste.o -MD -MP -MF > > ".deps/CutAndPaste.Tpo" -c -o CutAndPaste.o CutAndPaste.C; \ > > then mv -f ".deps/CutAndPaste.Tpo" ".deps/CutAndPaste.Po"; else rm -f > > ".deps/CutAndPaste.Tpo"; exit 1; fi > > CutAndPaste.C: In function `void lyxputClipboard(const > >lyx::ParagraphList&, unsigned int, const lyx::docstring&)': > > CutAndPaste.C:332: error: type specifier omitted for parameter > > CutAndPaste.C:332: error: syntax error before `false' > > hum, could it be because of the 'explicit' in: > > explicit Buffer(std::string const & file, bool b = false); > > ??? It is very fishy here. If I replace the call with: string a(""); Buffer buffer(a, false); then it compiles. On the other hand string a(); Buffer buffer(a, false); yields to CutAndPaste.C:676: error: no matching function for call to `lyx::Buffer::Buffer (std::string (&)(), bool)' buffer.h:73: error: candidates are: lyx::Buffer::Buffer(const lyx::Buffer&) buffer.h:92: error: lyx::Buffer::Buffer(const std::string&, bool) regards Kornel -- Kornel Benko [EMAIL PROTECTED] pgpLYZ9Vo3qND.pgp Description: PGP signature
Re: Cannot compile. Latest in trunk
Kornel Benko <[EMAIL PROTECTED]> writes: > It is very fishy here. > If I replace the call with: > string a(""); > Buffer buffer(a, false); > then it compiles. > > On the other hand > string a(); > Buffer buffer(a, false); > yields to > CutAndPaste.C:676: error: no matching function for call to `lyx::Buffer::Buffer >(std::string (&)(), bool)' > buffer.h:73: error: candidates are: lyx::Buffer::Buffer(const lyx::Buffer&) > buffer.h:92: error: lyx::Buffer::Buffer(const std::string&, >bool) That's not fishy at all. string a(""); defines a variable "a" and initializes it with "". The same thing is achieved more elegantly and less expensively with: string a; By way of contrast, string a(); is a declaration of a function "a" that takes no arguments and returns a string... If you look a little closely at the error message, you'll see that the compiler is even trying to tell you that. Regards, Angus
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 16:52 schrieb Kornel Benko: > It is very fishy here. > If I replace the call with: > string a(""); > Buffer buffer(a, false); > then it compiles. > > On the other hand > string a(); This is a function declaration of a function 'a' returning a string. What you want is string a; and I am sure it would work. Georg
Re: Cannot compile. Latest in trunk
Am Dienstag, 16. Januar 2007 19:41 schrieb Angus Leeming: > That's not fishy at all. > > string a(""); > > defines a variable "a" and initializes it with "". The same thing is > achieved more elegantly and less expensively with: > > string a; > > By way of contrast, > > string a(); > > is a declaration of a function "a" that takes no arguments and returns a > string... Of course you are right. Now I feel very unconfortable. Kornel -- Kornel Benko [EMAIL PROTECTED] pgpkWxT9IOUdR.pgp Description: PGP signature