| 1 |
|
|---|
| 2 | #include <boost/version.hpp>
|
|---|
| 3 | #include <boost/multiprecision/cpp_int.hpp>
|
|---|
| 4 | #include <iostream>
|
|---|
| 5 |
|
|---|
| 6 | using bigint = boost::multiprecision::number<boost::multiprecision::cpp_int_backend<>>;
|
|---|
| 7 | using u128 = boost::multiprecision::number<boost::multiprecision::cpp_int_backend<128, 128, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>;
|
|---|
| 8 |
|
|---|
| 9 | int main()
|
|---|
| 10 | {
|
|---|
| 11 | u128 a = 14;
|
|---|
| 12 | bigint b = bigint("115792089237316195423570985008687907853269984665640564039457584007913129639948");
|
|---|
| 13 | auto correct = a < b;
|
|---|
| 14 |
|
|---|
| 15 | std::cout << "Boost " << BOOST_VERSION << " : " << correct << std::endl;
|
|---|
| 16 | return !correct;
|
|---|
| 17 | }
|
|---|