gnzlbg / static_vector

A dynamically-resizable vector with fixed capacity and embedded storage
https://gnzlbg.github.io/static_vector
167 stars 21 forks source link

Safe for production use? #36

Closed CrushedPixel closed 5 years ago

CrushedPixel commented 6 years ago

Thanks for this library, I think it's a great idea to add a static_vector type to the C++ standard. Is the current version of the implementation reasonably safe for production use? I'd like to use it, as it has no external dependencies like boost etc.

gnzlbg commented 6 years ago

Is the current version of the implementation reasonably safe for production use? I'd like to use it [..]

The whole purpose of the implementation here was proving that the paper was implementable. The implementation was forked from a production implementation, but it was substantially modified in hacky ways and nobody has paid any attention to it for a while. There is no comprehensive CI, no guarantees about supported compiler versions, etc., so I cannot recommend using it in any production project.

CrushedPixel commented 6 years ago

I see. Are there any (possibly header-only) single-file libraries you can recommend, that supply a static_vector, or similar? I would like to avoid including a huge library just for a single datatype.

gnzlbg commented 6 years ago

Not really, the only implementation I can recommend is boost::container::static_vector. It's implementation is good, its battle tested, and I've used it in some projects without issues. In some of our projects, the Boost dependency was a no go, which is why we just ended up rolling our own implementation, but these are not publicly available.

CrushedPixel commented 6 years ago

Thank you. Feel free to close this issue, as my question has been answered, or leave it open for reference by future visitors with the same questions.

gnzlbg commented 6 years ago

FWIW, if you (or anybody else) want to bring this implementation to "production quality" level, I could take a look over it again (haven't done so in a long time), and maybe we could chat about it to get on the same page about the things that have to be done, etc.

I always planned to do this once the standardization process got to the point where we have to include the precise wording into the std, so that we get both the wording and the implementation right and can submit it right away for inclusion into libc++.

This does not mean that we can't work on such an implementation right now (only that we might have to change some things as the standardization process advances).

CrushedPixel commented 6 years ago

Unfortunately, I've only been programming C++ for half a year, so I'm definitely not the right person to ask when it comes to implementing highly-technical, performance-critical data structures. I am, however, excited about this proposal and wish you the best of luck to get it into the C++ standard :)

gnzlbg commented 5 years ago

I'm closing this as duplicate of #18 , LWG feedback is in, so once I finish incorporating it, I will update the implementation and make it production ready.