Boost logo

Boost :

Subject: Re: [boost] [Better Enums] More complete release - feedbackrequested
From: Peter Dimov (lists_at_[hidden])
Date: 2015-06-12 06:51:27


Anton Bachin wrote:
> Well. <iosfwd> turned out to be not so useful in a header-only library.
> Including it allows you to declare overloads, but not to (easily) define
> them, because you need various iostreams definitions and additional
> declarations. I did timing tests on some headers, and including anything
> from iostreams except <iosfwd> carried a significant penalty, well within
> a factor of 2 of <iostream> itself.
>
> I may have to move the operators to a separate file, but for now I put
> their definitions in enum.h, made them into templates, and hid the
> undefined iostreams types behind templates that depend on the overall
> template parameter.

Streams are already templated, so artificial templating shouldn't be
necessary if you use basic_istream and basic_ostream.


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