What eval essentially does is to launch a compiler and run the resulting code in the context of the currently running program. This is perfectly possible in C++: invoke a compiler, compile to a shared object and dlopen it. There is no fundamental difference between the two in that regard.
Also, eval is much less of a problem than memory-safety, as you can simply avoid using it. You can't avoid using memory.