Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some comments on the vcpkg PR to upgrade Au to 0.4.0 made me suspicious that we lacked coverage here. I added a test case, and sure enough, it [broke]. What's happening here is that MSVC is being _extremely persnickety_ about what we pass to a `static_assert`. We are passing a function parameter, which _in the general case_ might be a **runtime** value; hence, inappropriate for `static_assert`. What MSVC doesn't know is that `OtherUnit` is a [monovalue type], so it can only ever have one possible value, and therefore that value _is_ knowable at compile time. That said, since it _is_ a monovalue type, that means that it's safe to replace the instance `u` with an ad hoc construction of the type name, `OtherUnit{}`. This appeases MSVC. Helps #364: we'll go over every other `static_assert` before closing. [broke]: https://github.com/aurora-opensource/au/actions/runs/12395185495/job/34600303870 [monovalue type]: https://aurora-opensource.github.io/au/main/reference/detail/monovalue_types
- Loading branch information