[committed] libstdc++: Add 'typename' for Clang compatibility

Message ID 20220901194021.355886-1-jwakely@redhat.com
State New, archived
Headers
Series [committed] libstdc++: Add 'typename' for Clang compatibility |

Commit Message

Jonathan Wakely Sept. 1, 2022, 7:40 p.m. UTC
  Tested x86_64-linux, pushed to trunk.

-- >8 --

Clang doesn't yet implement the C++20 change that makes 'typename'
optional here.

libstdc++-v3/ChangeLog:

	* include/std/ranges (adjacent_transform_view::_Iterator): Add
	typename keyword before dependent qualified-id.
---
 libstdc++-v3/include/std/ranges | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index dad1e4c9f93..2b5cb0531f0 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -5555,7 +5555,7 @@  namespace views::__adaptor
       using __detail::__unarize;
       using _Res = invoke_result_t<__unarize<__maybe_const_t<_Const, _Fp>&, _Nm>,
 				   range_reference_t<_Base>>;
-      using _Cat = iterator_traits<iterator_t<_Base>>::iterator_category;
+      using _Cat = typename iterator_traits<iterator_t<_Base>>::iterator_category;
       if constexpr (!is_lvalue_reference_v<_Res>)
 	return input_iterator_tag{};
       else if constexpr (derived_from<_Cat, random_access_iterator_tag>)