dev-util/nvidia-cuda-toolkit does not like GCC >= 7 but the OpenCV ebuild does not warn or help with this. I propose that if the cuda USE flag is present, the ebuild should pull GCC < 7 and force the compiler to be that version. The user should not have to run eselect gcc or anything similar. The downside is that one more copy of GCC is pulled in when it is only used for building opencv[cuda]. There does not appear to be any harm with switching back to latest GCC after opencv is built, or removing this old version.
CUDA 11 works just fine with GCC 8 and GCC 9