Implicit conversion from Any Ptr to a pointer of a type other than Any is unsafe and should cause a compile-time error, or at least a warning.
Any Ptr
Any
I consider this a bug and not a feature request.
Behavior identical to that in C where a pointer to 'void' can be implicitly converted to and from any pointer to object type.
Furthermore, FreeBASIC even allows implicit conversion between an 'Any Ptr' and a procedure pointer, and vice versa.
C permits it, C++ does not.
Log in to post a comment.
Behavior identical to that in C where a pointer to 'void' can be implicitly converted to and from any pointer to object type.
Furthermore, FreeBASIC even allows implicit conversion between an 'Any Ptr' and a procedure pointer, and vice versa.
Last edit: fxm (freebasic.net) 2025-11-16
C permits it, C++ does not.