The Boost.FunctionTypes interface example can be found in your Boost install, at ${BOOST_ROOT}/libs/function_types/example/interface_example.cpp
.
The example produces a macro for defining Java-style interfaces using type erasure for virtual dispatch, instead of inheritance polymorphism. The macro is used like this:
BOOST_EXAMPLE_INTERFACE( interface_x,
(( a_func, (void)(int) , const_qualified ))
(( a_func, (void)(long), const_qualified ))
(( another_func, (int) , non_const ))