[Bug 1933018] [NEW] can't include algorithm header on clang++ with C++20
r3muxd
1933018 at bugs.launchpad.net
Sun Jun 20 03:13:02 UTC 2021
Public bug reported:
$ cat a.cpp
#include <algorithm>
$ clang++ -std=c++20 a.cpp
In file included from a.cpp:1:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/algorithm:64:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algo.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algobase.h:38:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3526: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;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
expectation: program compiles
reality: it doesn't
Ubuntu Impish Indri 21.10
libstdc++-10-dev:
Installed: 10.3.0-4ubuntu1
Candidate: 10.3.0-4ubuntu1
Version table:
*** 10.3.0-4ubuntu1 500
500 http://us.archive.ubuntu.com/ubuntu impish/main amd64 Packages
100 /var/lib/dpkg/status
ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: libstdc++-10-dev 10.3.0-4ubuntu1
ProcVersionSignature: Ubuntu 5.11.0-18.19+21.10.1-generic 5.11.17
Uname: Linux 5.11.0-18-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu67
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Sat Jun 19 23:08:16 2021
InstallationDate: Installed on 2021-06-17 (2 days ago)
InstallationMedia: Kubuntu 21.10 "Impish Indri" - Alpha amd64 (20210615)
SourcePackage: gcc-10
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: gcc-10 (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug impish
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-10 in Ubuntu.
https://bugs.launchpad.net/bugs/1933018
Title:
can't include algorithm header on clang++ with C++20
Status in gcc-10 package in Ubuntu:
New
Bug description:
$ cat a.cpp
#include <algorithm>
$ clang++ -std=c++20 a.cpp
In file included from a.cpp:1:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/algorithm:64:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algo.h:35:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algobase.h:38:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3526: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;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
expectation: program compiles
reality: it doesn't
Ubuntu Impish Indri 21.10
libstdc++-10-dev:
Installed: 10.3.0-4ubuntu1
Candidate: 10.3.0-4ubuntu1
Version table:
*** 10.3.0-4ubuntu1 500
500 http://us.archive.ubuntu.com/ubuntu impish/main amd64 Packages
100 /var/lib/dpkg/status
ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: libstdc++-10-dev 10.3.0-4ubuntu1
ProcVersionSignature: Ubuntu 5.11.0-18.19+21.10.1-generic 5.11.17
Uname: Linux 5.11.0-18-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu67
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Sat Jun 19 23:08:16 2021
InstallationDate: Installed on 2021-06-17 (2 days ago)
InstallationMedia: Kubuntu 21.10 "Impish Indri" - Alpha amd64 (20210615)
SourcePackage: gcc-10
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-10/+bug/1933018/+subscriptions
More information about the foundations-bugs
mailing list