You must write:
std::cout << ((*pB).*pf2)(3) << std::endl;
As I noticed, Boost does not define an operator ->*for any of the pointers, although this is possible (see the C ++ standard, sections 5.5 and 13.5).
In addition, the C ++ 11 standard does not define this operator for C ++ 11 smart pointers.
source
share