Am Freitag, 10. November 2006 20:07 schrieb Enrico Forestieri:
> On Fri, Nov 10, 2006 at 07:16:03PM +0100, Enrico Forestieri wrote:
> > On Fri, Nov 10, 2006 at 06:43:58PM +0100, Georg Baum wrote:
> > > I can understand that, but why do you not use std::num_put<char,
> > > std::basic_string<char>::iterator> directly?
> > 
> > Because when I did that (as done in the attached patch) I got the
> > following error:
> > 
> > 
g++ -DHAVE_CONFIG_H -I. -I../../../src/support -I../../src 
-I../../../src/support/.. -I../../../boost -Wno-uninitialized -funsigned-char 
-O2 -MT 
docstring.lo -MD -MP -MF .deps/docstring.Tpo -c 
../../../src/support/docstring.C -o 
docstring.o
> > ../../../src/support/docstring.C: In member function `virtual 
std::ostreambuf_iterator<lyx::char_type, std::char_traits<lyx::char_type> 
> 
lyx::ascii_num_put_facet::do_put(std::ostreambuf_iterator<lyx::char_type, 
std::char_traits<lyx::char_type> >, std::ios_base&, lyx::char_type, long 
int) const':
> 
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_facets.h:2404: 
error: `std::num_put<_CharT, _OutIter>::~num_put() [with _CharT = char, 
_OutIter = __gnu_cxx::__normal_iterator<char*, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > >]' is protected
> > ../../../src/support/docstring.C:407: error: within this context
> > make[5]: *** [docstring.lo] Error 1

I see.

> > Or maybe throw num_put_failure() ?

Yes, that is better.

> What about the attached? I renamed the facets and buried the facet doing
> the real work in the ascii_num_put_facet (which was formerly called
> odocstream_num_put_facet). Now an explicative message will be printed if
> the fill character is not in the ascii range.

Great!


Georg

Reply via email to