Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1971443 - clang / libstdc++: missing typename when compiling with <ranges> and -std=c++2a
Summary: clang / libstdc++: missing typename when compiling with <ranges> and -std=c++2a
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1981085 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-14 05:58 UTC by Marián Konček
Modified: 2021-07-12 09:45 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 100900 0 P3 RESOLVED error: missing 'typename' prior to dependent type name in <ranges> elements_view 2021-06-14 09:05:29 UTC

Description Marián Konček 2021-06-14 05:58:33 UTC
Compile the following file:
```
#include <ranges>
int main() {}
```

using:
$ clang++ -std=c++2a file.cpp

You will get an error:

/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/ranges:3466:19: error: missing 'typename' prior to dependent type name 'iterator_traits<iterator_t<_Base>>::iterator_category'
            using _Cat = iterator_traits<iterator_t<_Base>>::iterator_category;

This renders clang unusable for any code that includes ranges and compiles with c++20 flags because clang hasn't implemented P0634R3.

The very simple fix is to add Fedora-speciffic patch which simply adds the typename into libstdc++.

Comment 1 Jonathan Wakely 2021-06-14 09:05:30 UTC
(In reply to Marián Konček from comment #0)
> The very simple fix is to add Fedora-speciffic patch which simply adds the
> typename into libstdc++.

No, because Fedora's policy is upstream first (and it's already fixed upstream).

Comment 2 Jonathan Wakely 2021-07-12 09:45:20 UTC
*** Bug 1981085 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.