FLTK logo

STR #2240

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

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:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]

No files


Trouble Report Comments:

Post Text ]
Name/Time/Date 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 ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.