@@ -4608,6 +4608,22 @@ namespace chrono {
46084608 return _Istr;
46094609 }
46104610
4611+ namespace _From_stream_adl_only {
4612+ #if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1681199
4613+ void from_stream() = delete; // Block unqualified name lookup
4614+ #else // ^^^ no workaround / workaround vvv
4615+ void from_stream();
4616+ #endif // ^^^ workaround ^^^
4617+
4618+ template <class _Parsable, class _CharT, class _Traits, class... _Rest>
4619+ concept _Can_from_stream = requires(
4620+ basic_istream<_CharT, _Traits>& __istr, const _CharT* __s, _Parsable& __parsed, _Rest&&... __rest_args) {
4621+ from_stream(__istr, +__s, __parsed, _STD forward<_Rest>(__rest_args)...); // intentional ADL
4622+ };
4623+ } // namespace _From_stream_adl_only
4624+
4625+ using _From_stream_adl_only::_Can_from_stream;
4626+
46114627 template <class _CharT, class _Traits, class _Alloc, class _Parsable>
46124628 struct _Time_parse_iomanip_c_str {
46134629 _Time_parse_iomanip_c_str(const _CharT* _Fmt_, _Parsable& _Tp_,
@@ -4618,6 +4634,7 @@ namespace chrono {
46184634
46194635 friend basic_istream<_CharT, _Traits>& operator>>(
46204636 basic_istream<_CharT, _Traits>& _Is, _Time_parse_iomanip_c_str&& _Tpi) {
4637+ using _From_stream_adl_only::from_stream;
46214638 from_stream(_Is, _Tpi._Fmt, _Tpi._Tp, _Tpi._Abbrev, _Tpi._Offset); // intentional ADL
46224639 return _Is;
46234640 }
@@ -4638,6 +4655,7 @@ namespace chrono {
46384655
46394656 friend basic_istream<_CharT, _Traits>& operator>>(
46404657 basic_istream<_CharT, _Traits>& _Is, _Time_parse_iomanip&& _Tpi) {
4658+ using _From_stream_adl_only::from_stream;
46414659 from_stream(_Is, _Tpi._Fmt.c_str(), _Tpi._Tp, _Tpi._Abbrev, _Tpi._Offset); // intentional ADL
46424660 return _Is;
46434661 }
@@ -4648,12 +4666,6 @@ namespace chrono {
46484666 minutes* _Offset;
46494667 };
46504668
4651- template <class _Parsable, class _CharT, class _Traits, class... _Rest>
4652- concept _Can_from_stream = requires(
4653- basic_istream<_CharT, _Traits>& __istr, const _CharT* __s, _Parsable& __parsed, _Rest&&... __rest_args) {
4654- from_stream(__istr, +__s, __parsed, _STD forward<_Rest>(__rest_args)...); // intentional ADL
4655- };
4656-
46574669 _EXPORT_STD template <class _CharT, _Can_from_stream<_CharT, char_traits<_CharT>> _Parsable>
46584670 _NODISCARD auto parse(const _CharT* _Fmt, _Parsable& _Tp) {
46594671 return _Time_parse_iomanip_c_str<_CharT, char_traits<_CharT>, allocator<_CharT>, _Parsable>{_Fmt, _Tp};
0 commit comments