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

Generic layers [WIP] #29

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

WaDelma
Copy link
Member

@WaDelma WaDelma commented Jan 9, 2018

extends from #28 (Because I wanted to also make API in it to work)

This is an experimental PR trying to make the amount of layers in bitset generic using typenum.

Currently most of the 4 layered bitset tests work, but no other layer amounts are being tested.
Currently 1 is allowed for the amount of layers, which would break all of the logic. (The top layer is separate so 0 in generic parameter means 1 layers: This should be improved).
This change needs complete resign of BitSetLike trait.
It also hasn't done anything to the atomic variant.

@WaDelma
Copy link
Member Author

WaDelma commented Jan 11, 2018

I think I got it working, but it's not that polished.
Also it degrades it's usage: You have to always provide the amount of layers you want.
I added defaults, but for some reason rust doesn't take them into account.

@torkleyy
Copy link
Member

I've redecided; initially I was skeptical, but now I think this is a very useful addition.

@torkleyy
Copy link
Member

@WaDelma Can you estimate how long you're going to work on this?

@WaDelma
Copy link
Member Author

WaDelma commented Feb 17, 2018

Not completely sure: I have to check how the change would affect specs. Biggest blocker is that type defaults don't seem to work and you need to specify the size of BitSet when you use it. I should probably just add type aliases for common sizes and side step the problem.

I also have to make sure that documentation is up to date and that all of the tests are run on different sizes. After that it should be ready.

@torkleyy
Copy link
Member

Defaults really should work, I've used them a couple of times before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants