Repository navigation
Commit 3ff3cf6
fix: decay decltype(Fn) in method::override for MSVC 19.52 (#149)
MSVC 19.52 (VS 2026, toolset 14.52) gives `decltype(Fn)` the function
type, not the pointer type, for a function named without `&` in a
`template<auto... Fn>` pack. A single `template<auto Fn>` is unaffected,
and so is `&f`; a static member function is affected under /permissive-
(hence /std:c++20) but not in C++17 permissive mode. 19.51, gcc and
clang give the pointer type.
override_aux is only defined for `FnReturnType (*)(FnParameters...)`, so
`override<f>` fell back to the undefined primary template:
preamble.hpp(1031): error C2079: 'tuple_element<...override_aux<
void postfix_minus(...), void (...), false>>::element' uses undefined
struct
This broke fix_core_overrider_private_base.cpp and
fix_core_overrider_virtual.cpp on every MSVC 14.5 CI job. Other tests
that register free functions with override<> still compile on 19.52;
what spares them is not yet known.
Decay the type in override and inline_override.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016fFU6iQPU1xuk7zqr2XGQx1 parent 9ad9522 commit 3ff3cf6
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2800 | 2800 | | |
2801 | 2801 | | |
2802 | 2802 | | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
2803 | 2806 | | |
2804 | 2807 | | |
2805 | | - | |
2806 | | - | |
| 2808 | + | |
| 2809 | + | |
2807 | 2810 | | |
2808 | 2811 | | |
2809 | 2812 | | |
| |||
2829 | 2832 | | |
2830 | 2833 | | |
2831 | 2834 | | |
| 2835 | + | |
2832 | 2836 | | |
2833 | 2837 | | |
2834 | | - | |
2835 | | - | |
| 2838 | + | |
| 2839 | + | |
2836 | 2840 | | |
2837 | 2841 | | |
2838 | 2842 | | |
| |||
0 commit comments