slyfox mentioned that autoconf gets confused and downgrades to -std=gnu++11
from -std=gnu++17 (which autoconf defaults to) because the test is built
using -std=gnu++20 (new default) and it's invalid there.
Digging into that, it looks like it got fixed already a little while ago
by Paul, so just backport the patch.
Reported-by: Sergei Trofimovich <slyich@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>