Boost logo

Boost :

From: John Maddock (jz.maddock_at_[hidden])
Date: 2022-08-13 12:01:20


On 13/08/2022 12:26, Gero Peterhoff via Boost wrote:
> Hello,
> can you please provide the << and >> operators for
> boost::multiprecision::number as a stream template?
>
> currently (fixed ostream)
> template <class Backend, expression_template_option ExpressionTemplates>
> std::ostream& operator<<(std::ostream& os, const number<Backend,
> ExpressionTemplates>&)
>
> useful
> template <typename Char, typename Traits, typename Backend,
> expression_template_option ExpressionTemplates>
> std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char,
> Traits>& stream, const number<Backend, ExpressionTemplates>&)

I dodged that when first writing multiprecision because some backends
(all those that are external C libraries) have narrow character
conversions only.

So far - and somewhat to my surprise - not one person has requested
template iostream operators.  Do you have a concrete use case?

Best, John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk