Debian's latest stable Linux version "bullseye" has gcc-10.2.1. The just released Raspberry Pi OS (64-bit) is based on that as well. On the pi, its repository does not list any newer version. Last weekend, I compiled wxwidgets trunk and cb trunk on my pi. @killerbot: There I also had to apply the 3 tiny patches fixing compile errors I sent you a few days ago.
My recommendation is to keep cb compiling with gcc-10.2.1 for now. At least, its support for C++17 is pretty ok IMHO. Any newer gcc would exclude many users on debian as well as many users, students and makers on the pi. That would be unfortunate. Also, please do not forget users on less performant and/or low buget systems like in Africa.
btw: cb-trunk compiles (patched) on arch with gcc-13.1.1 or clang 15.07. At the moment, wxwidgets trunk does not compile out of the box with gcc-13.1.1. gcc-12 and 10 are fine though. Right now, just out of curiosity, I try to compile cb-trunk on my pi with clang-13. So far the compilation is ongoing. Fingers crossed.
My main platforms I use cb on are ubuntu (lts), arch as well as pi.
On distrowatch.com you can get a good overview of the gcc-version shipped with distros. e.g.:
mint 11.2
manjaro: 12.2
ubuntu (lts) 11.2
arch 13.1.1
FreeBSD 11.2
CentOS 11.2
Have a nice day.