mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 05:04:27 +02:00
[msvc][fix] internal compiler error for requires expression. "simplify" with extra concept
This commit is contained in:
@@ -89,9 +89,12 @@ std::basic_ostream<CharT, Traits>& to_stream(std::basic_ostream<CharT, Traits>&
|
||||
|
||||
MP_UNITS_EXPORT_BEGIN
|
||||
|
||||
template<typename OStream, typename T>
|
||||
concept is_mp_units_stream = requires (OStream os, T v) { detail::to_stream_impl(os, v); };
|
||||
|
||||
template<typename CharT, typename Traits, typename T>
|
||||
std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const T& v)
|
||||
requires requires { detail::to_stream_impl(os, v); }
|
||||
requires is_mp_units_stream<std::basic_ostream<CharT, Traits>, T>
|
||||
{
|
||||
return detail::to_stream(os, v);
|
||||
}
|
||||
|
Reference in New Issue
Block a user