$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
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.