Skip to content
forked from fmtlib/fmt
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting std::chrono::duration types to wide strings (#1533) #76

Merged
merged 1 commit into from
Jan 24, 2020

Conversation

sthagen
Copy link
Owner

@sthagen sthagen commented Jan 24, 2020

  • Fix formatting chrono durations to wide strings

  • Make format buffers const correct

  • Add FormatWide chrono test case

  • Fix incorrect wide encoding of 'µs'
    I think might be a source file encoding issue, so I used \u00B5 instead.

  • Update FormatWide test to use proper encoding of µs

  • Revert changes to format_localized's parameters

  • Use different overload of std::time_put<T>::put to avoid needing a format string

  • Use utf8_to_utf16 instead of having redundant overloads of get_units

  • Revert some minor changes

  • Remove FMT_CONSTEXPR from expression

This should hopefully fix compilation on VS <2019

  • Make suggested changes from code review

  • Run clang-format on chrono.h

  • Make sure unit isn't null before constructing a string_view from it

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

* Fix formatting chrono durations to wide strings

* Make format buffers const correct

* Add FormatWide chrono test case

* Fix incorrect wide encoding of 'µs'
I think might be a source file encoding issue, so I used \u00B5 instead.

* Update FormatWide test to use proper encoding of µs

* Revert changes to format_localized's parameters

* Use different overload of `std::time_put<T>::put` to avoid needing a format string

* Use utf8_to_utf16 instead of having redundant overloads of get_units

* Revert some minor changes

* Remove FMT_CONSTEXPR from expression

This should hopefully fix compilation on VS <2019

* Make suggested changes from code review

* Run clang-format on chrono.h

* Make sure unit isn't null before constructing a string_view from it
@sthagen sthagen merged commit f2906bc into sthagen:master Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant