mirror of
https://github.com/mpusz/mp-units.git
synced 2026-07-06 08:30:55 +02:00
fe0e76f602
The TODO branch for `dimension_symbol_formatting` and `unit_symbol_formatting` covered both Clang and MSVC: it dropped the deprecated `encoding` member to avoid an implicit-copy-constructor deprecation warning that pragma push/pop around the in-struct initialization can't suppress. That concern still applies to Clang, but on MSVC the warning we actually hit was C4996 at the in-struct `char_set = encoding;` line — which the existing pragma machinery can suppress, except `MP_UNITS_DIAGNOSTIC_IGNORE_DEPRECATED` was an empty no-op on MSVC. Map it to `warning(disable: 4996)` and narrow the formatting-struct conditional from `MP_UNITS_COMP_CLANG || MP_UNITS_COMP_MSVC` to just `MP_UNITS_COMP_CLANG`. MSVC now keeps the `[[deprecated]] encoding` alias like GCC. Verified by isolated rebuild + full test suite (40/40) under MSVC 195. Clang behavior is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>