Is it possible to set an AnimGraph purely in C++?

I have a C++ based AnimInstance which is the parent for a series of AnimBlueprints driving character movement.
This helps unify and simplify our AnimBPs greatly, as almost all of the EventGraph logic is now unified.

I’d like to go a step further and try to make the AnimGraph also out of C++, since much of the animation states for our characters is the same, and it would be nice to be able to unify even that (and of course to work on it in C++).

Is there any way to do this? Once in the past I tried making a “base” AnimBP with the AnimGraph in it, and then re-parenting the specific character AnimBPs to it. This seemed to work until I had to open and edit the Blueprint, which would cause the editor to crash…