Tested with boost 1.51.0:
std::cout << "Using Boost "
<< BOOST_VERSION / 100000 << "." // major version
<< BOOST_VERSION / 100 % 1000 << "." // minor version
<< BOOST_VERSION % 100 // patch level
<< std::endl;
Output: Using Boost 1.51.0
Tested with boost versions 1.51.0 to 1.65.0