subspace
subspace copied to clipboard
A concept-centered standard library for C++20, enabling safer and more reliable products and a more modern feel for C++ code.; Also home of Subdoc the code-documentation generator.
Option and Result of a base class reference should be constructible from and Option and Result of a subclass reference
To do this, we need to be able to implement IntoIterator for any type. That means it can't be a structural concept, but needs to be done through template specialization...
Right now we have `Anything` and `NonVoid` as in `sus::fn::FnMut` but it's very common to constrain on other return types like "returns an Option". So we should be able to...
https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.zip_with
Even if a type is conditionally trivially relocatable we can use `if constexpr` to do a memcpy when possible. We should do this for the key vocab types like Option,...
* [x] integers native * [x] floats native * [x] Option std::optional * [ ] Result std::expected (c++23...so far away) * [ ] Tuple std::tuple * [x] input_range Iterator *...
Downcast
[Box::downcast](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.downcast) is built on an [Any](https://doc.rust-lang.org/stable/std/any/trait.Any.html) trait that requires compiler support and can't be reproduced directly in C++. Downcasting correctly is a *big* part of memory safety/unsafety in C++ though....
`std::string_view::size()` reports its size without the null, which is fair. But you can't tell if it's null terminated without potentially reading OOB and causing UB. So you always have to...
CStrings, OSStrings, Strings, string constants. Char (aka unicode codepoints). There's a lot of possible ways to take this design space-wise. What's important is that C++ strings full of not-utf8 have...
Can specify a different allocator for a container and it will use that in place of the global allocator.