Work around mysterious errors with gcc, msvc-14.1, and clang-cl

This commit is contained in:
Peter Dimov
2021-09-15 03:28:29 +03:00
parent e668c099ce
commit 2da13befd7

View File

@ -2255,10 +2255,10 @@ template<class Ch, class Tr, class... T> struct ostream_insert_L
} // namespace detail
template<class Ch, class Tr, class... T> std::basic_ostream<Ch, Tr>& operator<<( std::basic_ostream<Ch, Tr>& os, variant<T...> const& v )
template<class Ch, class Tr, class T1, class... T> std::basic_ostream<Ch, Tr>& operator<<( std::basic_ostream<Ch, Tr>& os, variant<T1, T...> const& v )
{
return mp11::mp_with_index<sizeof...(T)>( v.index(),
detail::ostream_insert_L<Ch, Tr, T...>{ os, v } );
return mp11::mp_with_index<1 + sizeof...(T)>( v.index(),
detail::ostream_insert_L<Ch, Tr, T1, T...>{ os, v } );
}
// hashing support