2323#include < cassert>
2424#include < compare>
2525#include < cstddef>
26+ #include < source_location> // IWYU pragma: keep for std::source_location::current
2627#include < string_view>
2728#include < type_traits>
2829
@@ -815,23 +816,27 @@ namespace STDEXEC {
815816 return __sv.substr (__start, __len);
816817 }
817818
818- template <class T >
819+ template <class _Ty >
819820 [[nodiscard]]
820821 consteval std::string_view __get_pretty_name_helper () noexcept {
822+ #if STDEXEC_EDG()
821823 return __detail::__find_pretty_name (std::string_view{STDEXEC_PRETTY_FUNCTION ()});
824+ #else
825+ return __detail::__find_pretty_name (std::source_location::current ().function_name ());
826+ #endif
822827 }
823828
824- template <class T >
829+ template <class _Ty >
825830 [[nodiscard]]
826831 consteval std::string_view __get_pretty_name () noexcept {
827- return __detail::__get_pretty_name_helper<typename __xyzzy<T >::__plugh>();
832+ return __detail::__get_pretty_name_helper<typename __xyzzy<_Ty >::__plugh>();
828833 }
829834 } // namespace __detail
830835
831836 // //////////////////////////////////////////////////////////////////////////////////////////
832- // __mnameof: get the pretty name of a type T as a string_view at compile time
833- template <class T >
834- inline constexpr std::string_view __mnameof = __detail::__get_pretty_name<__demangle_t <T >>();
837+ // __mnameof: get the pretty name of a type _Ty as a string_view at compile time
838+ template <class _Ty >
839+ inline constexpr std::string_view __mnameof = __detail::__get_pretty_name<__demangle_t <_Ty >>();
835840
836841 static_assert (__mnameof<int > == " int" );
837842
@@ -841,13 +846,13 @@ namespace STDEXEC {
841846 concept __has_id = requires { typename _Ty::__id; };
842847
843848 // ! Identity mapping `_Ty` to itself.
844- // ! That is, `__same_as<T , typename _Id<T >::__t>`.
849+ // ! That is, `__same_as<_Ty , typename _Id<_Ty >::__t>`.
845850 template <class _Ty >
846851 struct _Id {
847852 using __t = _Ty;
848853
849854 // Uncomment the line below to find any code that likely misuses the
850- // ADL isolation mechanism. In particular, '__id<T >' when T is a
855+ // ADL isolation mechanism. In particular, '__id<_Ty >' when _Ty is a
851856 // reference is a likely misuse. The static_assert below will trigger
852857 // when the type passed to the __id alias template is a reference to
853858 // a type that is setup to use ADL isolation.
0 commit comments