c++compilationstandardsc++20gcc8

GCC 8.3 can't compile std::bind_front


is that possible that g++ somehow compile my program with older standard than I specified?

I compile with:

g++ -Wall -Wextra -pedantic -O3 -std=c++2a -fconcepts

And compiler can't recognize bind_front function ( I included <functional> ). Compiler version is GCC 8.3.


Solution

  • GCC 8.3 does not support std::bind_front. Check here.

    You need to use GCC 9.1 or 9.2. Check here.

    How to install GCC 9?

    UPDATE

    As the @walnut's comment says, there is a g++ 9 package in the standard repositories since Ubuntu 19.04.