Skip to content

Decimal updated per API Review #5523

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

Merged
merged 4 commits into from
Jun 23, 2025
Merged

Decimal updated per API Review #5523

merged 4 commits into from
Jun 23, 2025

Conversation

DrusTheAxe
Copy link
Member

@DrusTheAxe DrusTheAxe commented Jun 16, 2025

Updated per API Review'd spec (#5413)

Notable changes for C++:

  • Changed String conversions changed to trio of methods
    • to/from_string() = User's default locale
    • to/from_string_invariant() = Invariant
    • to/from_string(localeName) = explicit locale
  • Added: 'TryFrom' methods for string parsing e.g. bool try_from_string(input_source, output_value)
  • Deleted: Remove LCID from all API surfaces
  • Deleted: char support as an integer (use std:int16_t)
  • Added: Overloads for more string flavors:
    • PCSTR (current codepage)
    • PCWSTR
    • std::string
    • std::string_view
    • std::wstring
    • std::wstring_view
    • wil::zstring_view
    • HSTRING
    • winrt::hstring
  • Changed: scale() and max_scale() return std::uint8_t
  • Added: is_integer()

Notable changes for C#

  • Changed: FromDecimalValue() renamed ToDecimal() (name functions after return type)

Notable changes for WinRT:

  • Changed String conversions changed to trio of methods
    • To/FromString() = User's default locale
    • To/FromStringInvariant() = Invariant
    • To/FromString(localeName) = explicit locale
  • Added: 'TryFrom' methods for string parsing e.g. Boolean TryFromString(input_source, output_value)
  • Deleted: Char support as an integer (use Int16)
  • Changed: scale() and max_scale() return std::uint8_t

@DrusTheAxe
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@DrusTheAxe
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

@cwruss cwruss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DrusTheAxe DrusTheAxe merged commit 01dbbb9 into main Jun 23, 2025
34 checks passed
@DrusTheAxe DrusTheAxe deleted the user/drustheaxe/decimal3 branch June 23, 2025 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants