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

Optional overloadable support #5

Open
rurban opened this issue Jan 16, 2021 · 0 comments
Open

Optional overloadable support #5

rurban opened this issue Jan 16, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@rurban
Copy link
Owner

rurban commented Jan 16, 2021

So that we can optionally drop the type prefixes, currently clang-only.
https://clang.llvm.org/docs/AttributeReference.html#overloadable

// instead of
uset_int a = uset_int_init(NULL, NULL); // integral types have default methods
uset_int_insert(&a, 1);

// do
#define CTL_OVERLOADABLE
#define T int
#include <ctl/unordered_set.h>

uset_int a = uset_int_init(NULL, NULL);
insert(&a, 1);

See also _Generic support via #4

@rurban rurban self-assigned this Jan 16, 2021
@rurban rurban added the enhancement New feature or request label Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant