Issue 31733 - static_casts problematic with Forte C++ 6 Update 2
Summary: static_casts problematic with Forte C++ 6 Update 2
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: current
Hardware: Sun Solaris
: P2 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: hdu@apache.org
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-19 17:29 UTC by pavel
Modified: 2004-07-24 20:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Remove static_casts (4.75 KB, patch)
2004-07-19 17:29 UTC, pavel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2004-07-19 17:29:08 UTC
Hi,

this issue is manual-split from #i30346#.

I'm doing build QA on ooo20040704 with Forte 6 Update 2 which was successfully
used to build 1.1.2.

The build ends with

Error: Cannot cast away const or volatile.

(see #i30346# for discussion about it).

The attached patch fixes the build for me.
Comment 1 pavel 2004-07-19 17:29:45 UTC
Created attachment 16590 [details]
Remove static_casts
Comment 2 pavel 2004-07-19 17:30:22 UTC
set target
Comment 3 christof.pintaske 2004-07-21 10:14:08 UTC
cp->hdu: Please have a look at it since Philipp is on vacation. afaik a
static_cast really cannot cast away const, you need a const_cast for that. But
Is there really a need for a const iterator ? It might be more elegant to leave
the static_cast untouched but to change the iterator. As said, please have a look.
Comment 4 hdu@apache.org 2004-07-21 13:20:59 UTC
Yes, replacing the responsible const_iterators by their non-const counterparts
is the cleaner solution.
Comment 5 hdu@apache.org 2004-07-22 08:06:45 UTC
Using non-const iterators wasn't always possible, but solvable anyway.

HDU->PJANIK: since I don't have the exactly same compiler available here, please
check
  revision 1.56.12.2 of vcl/unx/source/app/saldisp.cxx
  revision 1.180.12.1 of vcl/unx/source/window/salframe.cxx
Comment 6 pavel 2004-07-24 20:17:16 UTC
Verified, closing.