Opened 8 years ago
Last modified 7 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 by , 8 years ago
comment:2 by , 8 years ago
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 by , 7 years ago
Status: | new → assigned |
---|
Yes, this can be useful. A patch would be welcome.