mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-25 03:44:04 +08:00
libstdc++: Fix variant build on 32-bit targets [PR95904]
libstdc++-v3/ChangeLog: * include/std/variant (__check_visitor_result): Use size_t for indexes. (__check_visitor_results): Likewise.
This commit is contained in:
parent
14db1dfcd1
commit
02cbd79e47
@ -1714,7 +1714,7 @@ namespace __variant
|
||||
template<typename _Tp, typename... _Types>
|
||||
constexpr inline bool __same_types = (is_same_v<_Tp, _Types> && ...);
|
||||
|
||||
template <unsigned long int _Idx, typename _Visitor, typename _Variant>
|
||||
template <size_t _Idx, typename _Visitor, typename _Variant>
|
||||
decltype(auto)
|
||||
__check_visitor_result(_Visitor&& __vis, _Variant&& __variant)
|
||||
{
|
||||
@ -1722,7 +1722,7 @@ namespace __variant
|
||||
std::get<_Idx>(std::forward<_Variant>(__variant)));
|
||||
}
|
||||
|
||||
template <typename _Visitor, typename _Variant, unsigned long int... _Idxs>
|
||||
template <typename _Visitor, typename _Variant, size_t... _Idxs>
|
||||
constexpr bool __check_visitor_results(std::index_sequence<_Idxs...>)
|
||||
{
|
||||
return __same_types<decltype(__check_visitor_result<_Idxs>(
|
||||
|
Loading…
Reference in New Issue
Block a user