C++ implementation of "Composing Contracts: An Adventure in Financial Engineering"