[gcc(refs/users/marxin/heads/marxin-gcc-benchmark-branch)] libstdc++: Add 'typename' to fix compilation with Clang

Martin Liska marxin@gcc.gnu.org
Mon Mar 30 10:31:57 GMT 2020


https://gcc.gnu.org/g:5fad000324d0bcc87283dc339423bfad6fa42c74

commit 5fad000324d0bcc87283dc339423bfad6fa42c74
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Mar 2 12:18:45 2020 +0000

    libstdc++: Add 'typename' to fix compilation with Clang
    
            * include/bits/ranges_algo.h (shift_right): Add 'typename' to
            dependent type.

Diff:
---
 libstdc++-v3/ChangeLog                  | 5 +++++
 libstdc++-v3/include/bits/ranges_algo.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 509de8ae916..7a02492339d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-02  Jonathan Wakely  <jwakely@redhat.com>
+
+	* include/bits/ranges_algo.h (shift_right): Add 'typename' to
+	dependent type.
+
 2020-03-01  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
diff --git a/libstdc++-v3/include/bits/ranges_algo.h b/libstdc++-v3/include/bits/ranges_algo.h
index 8fa4a8a9161..a34f75f53d8 100644
--- a/libstdc++-v3/include/bits/ranges_algo.h
+++ b/libstdc++-v3/include/bits/ranges_algo.h
@@ -3710,7 +3710,7 @@ namespace ranges
       if (__n == 0)
 	return __first;
 
-      using _Cat = iterator_traits<ForwardIterator>::iterator_category;
+      using _Cat = typename iterator_traits<ForwardIterator>::iterator_category;
       if constexpr (derived_from<_Cat, bidirectional_iterator_tag>)
 	{
 	  auto __mid = ranges::next(__last, -__n, __first);


More information about the Libstdc++-cvs mailing list