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
89 stars 15 forks source link

IOStreams #235

Closed danakj closed 1 year ago

danakj commented 1 year ago

Lots of stuff expects C++ types to be streamable. But stream headers are also the worst for compile times.

Right now, to print a numeric you need to cast it to a primitive:

    for (auto [pos, val]: it) {
      std::cerr << "(" << size_t{pos} << ", " << int{val} << ")\n";
    }

We could:

We need a better story to print numerics though before they are stabilized, whatever we pick.

danakj commented 1 year ago

Done by https://github.com/chromium/subspace/issues/230