
On 04/15/2011 01:08 PM, Brian Budge wrote:
Hi all -
I'm using boost karma to generically generate strings from many different types use auto_. I've noticed that if I specify some double precision numbers like 1.123456, I will only get "1.123" out as a string. While looking around the documentation, it seems that it is possible to specify the precision up to numeric_limits<real>::digits10 + 1. I couldn't find an example for how to do this with double_ let alone auto_. Can anyone point me in the right direction? Is there documentation that google couldn't find for me?
Thanks, Brian _______________________________________________
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 -- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com