DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2240
Version: 2.0-current


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);


Link: http://www.fltk.org/str.php?L2240
Version: 2.0-current

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to