https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100344
--- Comment #7 from David Binderman <dcb314 at hotmail dot com> --- Reduced C++ code seems to be: template <int __v> struct integral_constant { static constexpr int value = __v; }; template <typename> constexpr long find_index() { return 1; } template <typename... Ts> using find_index_checked = integral_constant<find_index<Ts...>()>; template <typename> class Trans_NS_mpark_variant {}; template <long, typename... Ts> void get(Trans_NS_mpark_variant<Ts...>); template <typename... Ts> void get(Trans_NS_mpark_variant<Ts...> v) { get<find_index_checked<Ts...>::value>(v); } void TestBody() { Trans_NS_mpark_variant<float> w; get(w); }