Skip to content
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 fmt 10.x+ compatibility issue in vcd_trace.hh #51

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Nov 29, 2023

SCC fails to compile with fmt 10 due to and explicit formatter for sc_dt::sc_fxval_fast not being found:

fmt20600bf402265/p/include/fmt/core.h:1576:63: error: ‘fmt::v10::detail::type_is_unformattable_for<sc_dt::sc_fxval_fast, char> _’ has incomplete type
 1576 |     type_is_unformattable_for<T, typename Context::char_type> _;
      |                                                               ^
fmt20600bf402265/p/include/fmt/core.h:1580:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
 1580 |       formattable,
      |       ^~~~~~~~~~~

This PR suggests a workaround that simply casts the value to double before formatting.

This came up in an update for the SCC Conan recipe: conan-io/conan-center-index#18715

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.

2 participants