|
Boost : |
Subject: Re: [boost] [type_erasure] Review started (July 18-27, 2012)
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2012-08-15 12:06:54
> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Steven
> Watanabe
> Sent: Wednesday, August 08, 2012 3:29 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] [type_erasure] Review started (July 18-27, 2012)
>
> AMDG
I've wanted to add control of the column width.
virtual void do_print(
ostream_type os, iterator_type first, iterator_type last) const {
if(first != last)
{
os << *first;
++first;
for(; first != last; ++first) {
os << separator.c_str() << *first;
}
}
I expected to be able to add
os.width(20);
before
os << separator.c_str();
but that doesn't work.
j:\cpp\misc\type_erasure_lister\./type_erasure_lister.hpp(219): error C2039: 'width' : is not a
member of 'boost::type_erasure::any<Concept,T>'
with
[
Concept=abstract_printer::requirements,
T=_os &
]
Is there some requirement that I need to add to os to permit this?
I stabbed at something like callable<int(int)> but that doesn't help.
Thanks
Paul
--- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk