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;
}

13
tests/sources/main.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include <boost/algorithm/string.hpp>
#include <string>
#include <iostream>
using namespace boost::algorithm;
int main()
{
std::string s = "Boost C++ Libraries";
std::cout << to_upper_copy(s) << '\n';
return 0;
}

View File

@@ -0,0 +1,13 @@
#include <boost/log/trivial.hpp>
int main(int, char*[])
{
BOOST_LOG_TRIVIAL(trace) << "A trace severity message";
BOOST_LOG_TRIVIAL(debug) << "A debug severity message";
BOOST_LOG_TRIVIAL(info) << "An informational severity message";
BOOST_LOG_TRIVIAL(warning) << "A warning severity message";
BOOST_LOG_TRIVIAL(error) << "An error severity message";
BOOST_LOG_TRIVIAL(fatal) << "A fatal severity message";
return 0;
}