Skip to content

Optional overloadable support #5

@rurban

Description

@rurban

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions