Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax ALIAS string validation #493

Open
a740g opened this issue May 21, 2024 · 0 comments
Open

Relax ALIAS string validation #493

a740g opened this issue May 21, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@a740g
Copy link
Contributor

a740g commented May 21, 2024

Currently, QB64 generates an error Expected ALIAS name-in-library when attempting the following code:

DECLARE LIBRARY
    FUNCTION MaxLong& ALIAS "std::max<int>" (BYVAL x AS LONG, BYVAL y AS LONG)
    FUNCTION MinLong& ALIAS "std::min<int>" (BYVAL x AS LONG, BYVAL y AS LONG)
END DECLARE

This issue prevents the correct usage of templated C++ functions, particularly since QB64 substitutes NULL for zero, causing the underlying C++ compiler to become extremely upset.

The solution could be to simply stop the ALIAS string validation or to at least relax it, enabling the proper use of C++ templated functions. Given that this is advanced, low-level coding, it would make sense to leave the contents of the ALIAS string to the discretion of the programmer.

@a740g a740g added bug Something isn't working enhancement New feature or request labels May 21, 2024
@a740g a740g added this to Backlog in Backlog/In Progress via automation May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant