felixguendling / cista

Cista is a simple, high-performance, zero-copy C++ serialization & reflection library.
https://cista.rocks
MIT License
1.78k stars 113 forks source link

Any plans for c++20? #165

Closed alvarogalloc closed 1 year ago

alvarogalloc commented 1 year ago

With the latest update of the most recent compilers, I think this library suits an update for the new language version

felixguendling commented 1 year ago

Thank you for your proposal. Which features from C++20 or C++23 do you mean? I think there's no value in rewriting the library for the sake of it. So there needs to be a significant gain in developer experience to justify the effort. I'm happily using cista in C++20 projects and didn't see any shortcomings that can now be fixed with C++20/23 features newly added to the language. I don't see me rewriting the libraries internals that are not "customer facing". An upgrade to C++20 would exclude users or require preprocessor checks/flags, so this requires caution.

felixguendling commented 1 year ago

In some places, cista already uses C++20 features if they're available: https://github.com/felixguendling/cista/blob/1ab98b3a3b9b41b12788107325df3d7b7c49efa6/include/cista/containers/offset_ptr.h#L16-L26

I think one thing could be to add operator<=> support to cista's containers (conditionally, if C++20 is available). Anything else?