Extending C++ static computation of polynomial-time algorithms