I have extracted the code with does not compile anymore. With boost 1.70 and gmock 1.7.2 the code compiles without any error but with newer libraries boost 1.72 and gmock 1.