Skip to main content
Topic: Fix compilation failure on gcc... by being const-correct (Read 1550 times) previous topic - next topic

Fix compilation failure on gcc... by being const-correct

That 'casting away constness' bug?  Recent changes caused it to turn into a failure-to-compile bug on gcc.  (Sometimes the compiler believes you if you tell it that something is const....)  

I fixed it.  The function returns a non-const value now.  In addition, a section of code is restructured to use a modifiable lvalue rather than an rvalue.  Patch is attached.  (edit: compiles and runs.)

 

Re: Fix compilation failure on gcc... by being const-correct

Reply #1
You can forget this patch as the compilation failure was fixed another way. :-)