[Bug 290163] print/paps: Fails to compile with fmt 12.0.0
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 290163] print/paps: Fails to compile with fmt 12.0.0"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Oct 2025 20:59:48 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290163
Matthias Andree <mandree@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://github.com/dov/paps
| |/issues/60#issuecomment-340
| |3500667
CC| |eduardo@FreeBSD.org,
| |mandree@FreeBSD.org
--- Comment #2 from Matthias Andree <mandree@FreeBSD.org> ---
It'll remain broken on i386 because it tries std::variant's holds_alternative
on a std::time_t - and that aliases "int" only on i386.
Detailed analyses also posted upstream, copy here:
-----
The issue is that one of the types in a variant degenerates to int, namely
time_t. sizeof(time_t) == 4 == sizeof(int) on FreeBSD only for i386, see
arch(7) [1], and the net result is that using scalar_t = std::variant<int,
std::string, double, std::time_t>; then declares int twice, and that breaks
holds_alternative [2] - which is what the static_assert parts of the error
message convey.
All other 32-bit architectures of FreeBSD's have sizeof(int) == 4 and
sizeof(time_t) == 8 and are unaffected.
However, before it ends up too much of an effort, be aware that i386 is on the
way out. It's already "developmental and niche", Tier 2 platforms are
functional, but less mature FreeBSD platforms. They are not supported by the
security officer, release engineering, and Ports Management Team.
[...] Haven't looked. std::variant get (by index, not by type) or index might
help somewhat but still time_t and int might be the same type and then you need
to track separately if your variant holds a time or a plain integer, if that
matters for formatting.
- https://www.freebsd.org/platforms/
-
https://docs.freebsd.org/en/articles/committers-guide/#_tier_2_developmental_and_niche_architectures
Further links:
[1] https://man.freebsd.org/cgi/man.cgi?arch(7)
[2] https://en.cppreference.com/w/cpp/utility/variant/holds_alternative.html
--
You are receiving this mail because:
You are the assignee for the bug.