Opened 4 years ago

Last modified 3 years ago

#11041 assigned Feature Requests

Add no_unit to duration_style.

Reported by: rkawulak Owned by: viboes
Milestone: To Be Determined Component: chrono
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

When using Chrono I/O V2, currently there's no easy way to specify that only the numeric value of a duration without the unit should be output to a stream (equivalent of duration unit pattern "%v"). It would be useful to add a new enumerator, say 'no_unit', to duration_style enumeration, and a corresponding stream manipulator (e.g. 'no_unit_format').

Change History (3)

comment:1 Changed 4 years ago by viboes

Yes, this can be useful. A patch would be welcome.

comment:2 Changed 4 years ago by rkawulak

It seems that a more flexible approach would be to allow changing the pattern of duration_units facet (currently that's not possible since there's no interface to modify the pattern). Unfortunately I won't be able to provide a patch at the moment.

comment:3 Changed 3 years ago by viboes

Status: newassigned
Note: See TracTickets for help on using tickets.