@@ -4608,6 +4608,22 @@ namespace chrono {
4608
4608
return _Istr;
4609
4609
}
4610
4610
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
+
4611
4627
template <class _CharT, class _Traits, class _Alloc, class _Parsable>
4612
4628
struct _Time_parse_iomanip_c_str {
4613
4629
_Time_parse_iomanip_c_str(const _CharT* _Fmt_, _Parsable& _Tp_,
@@ -4618,6 +4634,7 @@ namespace chrono {
4618
4634
4619
4635
friend basic_istream<_CharT, _Traits>& operator>>(
4620
4636
basic_istream<_CharT, _Traits>& _Is, _Time_parse_iomanip_c_str&& _Tpi) {
4637
+ using _From_stream_adl_only::from_stream;
4621
4638
from_stream(_Is, _Tpi._Fmt, _Tpi._Tp, _Tpi._Abbrev, _Tpi._Offset); // intentional ADL
4622
4639
return _Is;
4623
4640
}
@@ -4638,6 +4655,7 @@ namespace chrono {
4638
4655
4639
4656
friend basic_istream<_CharT, _Traits>& operator>>(
4640
4657
basic_istream<_CharT, _Traits>& _Is, _Time_parse_iomanip&& _Tpi) {
4658
+ using _From_stream_adl_only::from_stream;
4641
4659
from_stream(_Is, _Tpi._Fmt.c_str(), _Tpi._Tp, _Tpi._Abbrev, _Tpi._Offset); // intentional ADL
4642
4660
return _Is;
4643
4661
}
@@ -4648,12 +4666,6 @@ namespace chrono {
4648
4666
minutes* _Offset;
4649
4667
};
4650
4668
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
-
4657
4669
_EXPORT_STD template <class _CharT, _Can_from_stream<_CharT, char_traits<_CharT>> _Parsable>
4658
4670
_NODISCARD auto parse(const _CharT* _Fmt, _Parsable& _Tp) {
4659
4671
return _Time_parse_iomanip_c_str<_CharT, char_traits<_CharT>, allocator<_CharT>, _Parsable>{_Fmt, _Tp};
0 commit comments