Boost のバージョンの取得方法

ideone の Boost のバージョンを取得したかったのでついでに覚書。

[ソース]

#include <boost/version.hpp>
#include <iostream>

int
main(){
    std::cout << BOOST_VERSION << std::endl;
    std::cout << "major version:" << BOOST_VERSION / 100000 << std::endl;
    std::cout << "minor version:" << BOOST_VERSION / 100 % 1000 << std::endl;
    std::cout << "patch level:" << BOOST_VERSION % 100 << std::endl;
    return 0;
}

[ideone での実行結果]

103900
major version:1
minor version:39
patch level:0

http://ideone.com/Nl7Sb