Implement builders to build Boost from source code

This commit is contained in:
Maxim Lobanov
2020-05-27 09:24:57 +03:00
parent 886c1d6104
commit 610555ac3d
36 changed files with 2005 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#include <cassert>
#include <exception>
#include <iostream>
#include <cstdint>
#include <boost/safe_numerics/safe_integer.hpp>
int main()
{
std::cout << "Using safe numerics" << std::endl;
try{
using namespace boost::safe_numerics;
safe<int> x = INT_MAX - 5;
++x;
}
catch(const std::exception & e){
std::cout << e.what() << std::endl;
std::cout << "error detected!" << std::endl;
}
return 0;
}