cuda-api-wrappers
cuda-api-wrappers copied to clipboard
Address unique_span issues from cr.SX
I've asked for a code review of my unique_span class, on codereviews.stackexchange.com, and got one.
Issues brought up:
- Can simplify
swap() - No need to delete copy ctors other than those C++ might itself generate
- Assignment to the base-class is long-winded
- We should be able to convert from a span of
Tto a span of constT. - We don't know that
release()isnoexcept... so making any of our [move] constructorsnoexceptis a leap of faith. - Deleter is not stored
- Factory method is not allocator-aware
- Factory method requires default-constructible element type
- No Tests
Well, my decision about all of those:
- Do it.
- It's a form of documentation-via-code... plus I'm not 100% sure this can't happen, e.g. via type conversion which isr's b
- Neat, let's do it. But - assigning
{}is a bit confusing for the reader, IMHO, so let's keep that part explicit. - Do it.
- Do it - drop the noexcept.
- Mulling over whether I want to support a stateful deleter. For now - not doing it.
edit: see #678 . - Not right now.
- Not right now.
- Ah, tests... we all want tests.