
15 Apr
2011
15 Apr
'11
10:39 p.m.
Hi Brian -
The important parts are here: http://www.boost.org/doc/libs/1_46_1/libs/spirit/doc/html/spirit/karma/refer...
That little example shows you how to customize the real number formatting to have whatever policies you want. The policy of interest to you is precision as listed in the table below the example.
HTH michael
Hi Michael - Thanks for the pointer. If I use a floating point policy, but pass in an integer, will it simply be ignored? In other words, if I use generate, but I don't know the type being generated into a string, how do I specify these policies? Or do I need to specialize my own use of generate to only do this if I have a floating point type? Thanks, Brian