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

span constructor improvements #70

Open
BurningEnlightenment opened this issue Jun 16, 2022 · 1 comment
Open

span constructor improvements #70

BurningEnlightenment opened this issue Jun 16, 2022 · 1 comment

Comments

@BurningEnlightenment
Copy link

explicit uuid(span<value_type, 16> bytes)

This should be changed to

explicit uuid(span<value_type const, 16> bytes) 

in order to support construction from immutable contiguous containers and it can be made constexpr in C++20 mode.

It would also be nice if we had a

CONSTEXPR20 explicit uuid(span<std::byte const, 16> bytes) 

constructor for symmetry with as_bytes() -> span<std::byte const, 16> bytes.

I'd be willing to implement it and update the paper if this is uncontroversial.

@mcopik
Copy link

mcopik commented Oct 25, 2022

👍 for the problem - the interface is right now inconsistent. as_bytes uses std::byte while creating a new uuid enforce casting to uint8_t.

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

No branches or pull requests

2 participants