Skip to content

Commit a3136ea

Browse files
authored
Update base.h
Fixes the following error with MSVC ``` d:\vcpkg\installed\arm64-msvc-static-md\include\fmt\base.h(2302): error C2446: ':': no conversion from 'std::tuple<T1,T2>' to 'unsigned __int64' with [ T1=fmt::v11::detail::<unnamed-enum-is_unpacked_bit>, T2=size_t ] d:\vcpkg\installed\arm64-msvc-static-md\include\fmt\base.h(2302): note: the template instantiation context (the oldest one first) is D:\optimlir\proto\CodeTemplates.h(103): note: see reference to function template instantiation 'std::string fmt::v11::format<fmt::v11::join_view<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,char>>(fmt::v11::fstring<fmt::v11::join_view<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,char>>,fmt::v11::join_view<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,char> &&)' being compiled with [ _Ty=std::string ] ```
1 parent 6fdf225 commit a3136ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/fmt/base.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2323,7 +2323,7 @@ constexpr auto encode_types() -> unsigned long long {
23232323
template <typename Context, typename... T, size_t NUM_ARGS = sizeof...(T)>
23242324
constexpr auto make_descriptor() -> unsigned long long {
23252325
return NUM_ARGS <= max_packed_args ? encode_types<Context, T...>()
2326-
: is_unpacked_bit | NUM_ARGS;
2326+
: static_cast<unsigned long long>(is_unpacked_bit) | NUM_ARGS;
23272327
}
23282328

23292329
template <typename Context, int NUM_ARGS>

0 commit comments

Comments
 (0)