Compile fails with -fconcepts -std=gnu++14

Bug #2061828 reported by Peter Krefting
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-defaults (Ubuntu)
New
Undecided
Unassigned

Bug Description

$ cat /tmp/try.cc
#include <vector>

int main()
{
    return 0;
}
$ g++ -fconcepts -std=gnu++14 -o try try.cc
In file included from /usr/include/c++/13/vector:67,
                 from try.cc:1:
/usr/include/c++/13/bits/stl_bvector.h:597:18: error: ‘is_default_constructible_v’ was not declared in this scope; did you mean ‘is_default_constructible’?
  597 | requires is_default_constructible_v<_Bit_alloc_type>
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | is_default_constructible
/usr/include/c++/13/bits/stl_bvector.h:597:9: error: expression must be enclosed in parentheses
  597 | requires is_default_constructible_v<_Bit_alloc_type>
      | ^~~~~~~~
/usr/include/c++/13/bits/stl_bvector.h:597:9: error: expected ‘;’ at end of member declaration
  597 | requires is_default_constructible_v<_Bit_alloc_type>
      | ^~~~~~~~
      | ;
/usr/include/c++/13/bits/stl_bvector.h:597:18: error: ‘is_default_constructible_v’ does not name a type; did you mean ‘is_default_constructible’?
  597 | requires is_default_constructible_v<_Bit_alloc_type>
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | is_default_constructible

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: g++ 4:13.2.0-7ubuntu1
ProcVersionSignature: Ubuntu 6.8.0-22.22-generic 6.8.1
Uname: Linux 6.8.0-22-generic x86_64
ApportVersion: 2.28.0-0ubuntu1
Architecture: amd64
CasperMD5CheckResult: pass
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Tue Apr 16 12:32:20 2024
InstallationDate: Installed on 2024-01-03 (104 days ago)
InstallationMedia: Ubuntu-Server 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230810)
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to noble on 2024-04-12 (4 days ago)

Revision history for this message
Peter Krefting (peterk) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.