chromium / subspace

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.
https://suslib.cc
Apache License 2.0
88 stars 15 forks source link

Export everything in a sus module. #152

Open danakj opened 1 year ago

danakj commented 1 year ago

It's a pain point to have to include the iterator.h header yourself when using iterators on a type.

Granted there's circular references Option -> Iterator -> Option. Can we use template types to break the cycle in the code like we did for integers?

danakj commented 1 year ago

I don't think this is solvable without collapsing everything into one header. We should solve this problem with modules instead,

danakj commented 1 year ago

Going modules is probably going to be a big pain cuz the unit tests will import sus; and something is going to break in clang https://clang.llvm.org/cxx_status.html but we can give it a try and see how far we get. Maybe it'll work out?

danakj commented 1 year ago

Modules are in a worse place than I thought for non-MSVC platforms. We need some serious support from build systems (cmake) on top of just compiler support. So this is not going to happen any time soon.