OpenCV RoI Pooling

I am trying to write detection code for Fast R-CNN in C++ but it seems that the RoI pooling layer is not supported by OpenCV so I can’t read in my network. But this doesn’t make any sense to me, since I’ve seen detection code for Faster R-CNN in C++ which uses OpenCV. I was under the impression that Faster R-CNN also had an RoI pooling layer. What am I missing?