C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Modern std::byte stream IO for C++
From: Ryan Nicholl (rnicholl_at_[hidden])
Date: 2020-03-05 14:09:38


Suggestion: Read and write should not be added as member functions, but as trait specializations.

Reason: Adding serialization points for third party code.

I did this in my rpnx::serial_traits library. It worked pretty well and allowed me to define partial specializations for e.g. std::map<K, V> where K and V also has serial specializations. This was an iterator based library (just reads/writes from iterators instead of "memory" or "files").

-------- Original Message --------
On Mar 5, 2020, 14:38, Lyberta via Std-Proposals wrote:

> This paper proposes fundamental IO concepts, customization points for serialization and deserialization and streams for memory
> and file IO.
>
> It was initially based on design similar to iostreams but most of it was changed to be in line with modern C++20 practice. In
> particular, the proposal embraces type erasure instead of virtual functions, exceptions instead of operator bool() and
> customization points instead of arithmetic shift operators.
>
> During benchmarking of sequential file IO on Linux proposed std::io::input_file_stream is ~30% faster than std::FILE and ~45%
> faster than std::ifstream while proposed std::io::output_file_stream is ~38% faster than std::FILE and ~60% faster than
> std::ofstream.
>
> I'm looking for a champion to present the proposal in Varna.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals



STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups