id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7261,Boost.Units quantity output overflows ostream width field,Paul A. Bristow,Steven Watanabe,"Boost.Units quantity output overflows ostream width field quantity ql = 2345.6 * meters; std::cout << std::setw(20) << ql << std::endl; outputs 22 chars instead of 20 chars. The reason is that the first item value() is output using the ios width setting, but the second unit() 'm' (and separating space) is not. if os.width() > 0 then a way is to build a single string of the quantity with the width specified for example using an ostringstream (otherwise, outputing value and unit (perhaps autoprefixed to km) severally would overflow the width). (else if os.width() <= 0 then output directly to ostream os as at present). A test and a patch to deal with this is attached. (This is not necessarily the most efficient way to deal with this but appears to work).",Bugs,new,To Be Determined,units,Boost 1.52.0,Problem,,units ostream width overflow,boost@…