| [ Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]
STR #2240
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 2 - Specific to an operating system |
Subsystem: | Unassigned |
Summary: | WidgetAssociation.cxx compile fails with Visual C++ 6 - Error: unable to convert param for 'foreach' |
Version: | 2.0-current |
Created By: | Techgee |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]No files
Trouble Report Comments:
[ Post Text ]
|
#1 | Techgee 12:19 Aug 16, 2009 |
| The call to the global scope foreach() inside fltk::foreach() needs global scope resolution operator '::'
Compilation error:
Compiling... WidgetAssociation.cxx D:\Development\fltk-2.0.x-r6841\src\WidgetAssociation.cxx(315) : error C2664: 'foreach' : cannot convert parameter 1 from 'struct PrimaryAssociation *' to 'const class fltk::AssociationType *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast D:\Development\fltk-2.0.x-r6841\src\WidgetAssociation.cxx(325) : error C2664: 'foreach' : cannot convert parameter 1 from 'struct PrimaryAssociation *' to 'const class fltk::AssociationType *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Error executing cl.exe.
The following changes fix this:
void* fltk::foreach(const AssociationType* at, const Widget* wg, AssociationFunctor& fkt) { [...] // return foreach(node, at, fkt); // causes compilation errors with VS6 return ::foreach(node, at, fkt); [...] // void * res = foreach(node, at, fkt); // causes compilation errors with VS6 void * res = ::foreach(node, at, fkt); | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |