Subject: Re: [boost] [spirit/karma] missing specialization for char types in numeric_utils.hpp
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2009-12-02 09:41:43
> while testing some stuff using the karma generator like this
> template <typername T> void do_calculations()
> char buf ; // this is enough to display any of the numbers
> T val = value_getter();
> char * ptr = buf;
> boost::spirit::karma::generate( ptr, boost::spirit::karma::int_,
> val );
> std::cout << buf << std::endl;
> the compiler (MSVC 2005) gave me errors when T was any of the "char"
> about ambiguous overloads for "fabs()".
> After adding the lines
> BOOST_SPIRIT_ABSOLUTE_VALUE(signed char, unsigned char);
> BOOST_SPIRIT_ABSOLUTE_VALUE(char, unsigned char);
> BOOST_SPIRIT_ABSOLUTE_VALUE_UNSIGNED(unsigned char);
> in boost\spirit\home\karma\numeric\detail\numeric_utils.hpp
> , the problem went away. (This is with boost 1.41.0)
> I am not sure if this is the proper way to fix this or whether we'd
> need to
> regard the possibly different implementations for "char" in various
> If this really fuixes this bug, could anyone please commit the changes
> the next release?
I patched in your fix and will commit after my local tests have cycled.
Meet me at BoostCon
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk