For some reason, a recent version of CLion (2025.2.3) is failing to identify that the friend class device_t; statement in the definition of cuda::device::primary_context_t refers to cuda::device_t. Weird, huh?
Well, for now, let's make that friendship easier to recognize using a fully-qualified class name.