What libraries can be used when writing a contract in C++? What are the limitations? If I have a library I normally use and like, how do I compile it for use by contracts?
Contracts are in WASM which is a compiled binary language. The only currently tested and validated language for EOS smart contract development is C++, but in theory any language that compiles down to WASM can be used. There is an active community effort to support TypeScript as well.
The code for Boost is in https://github.com/EOSIO/eosio.cdt/tree/master/libraries/boost
The main EOS library is eosiolib, and it uses Boost in action.hpp, dispatcher, datastream, etc.