
Boost
ztq小天
sdasas
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
boost 序列化3--xml
https://www.ibm.com/developerworks/cn/aix/library/au-boostserialization/index.html#include<boost/archive/text_oarchive.hpp>#include <boost/archive/text_iarchive.hpp>#include <boost/archive/xml_oarchive.hpp>#include <boost/archive原创 2020-09-24 18:14:53 · 313 阅读 · 0 评论 -
boost 序列化2
http://dozb.bokee.com/1692310.html#simplecase#include<boost/archive/text_oarchive.hpp>#include <boost/archive/text_iarchive.hpp>#include <fstream>const int SIZE = 4;using namespace std;// 可序列化的成员// 一个可序列化的类,可拥有可序列化的成员(普通内置类型成员变原创 2020-09-24 17:15:39 · 199 阅读 · 0 评论 -
boost::function
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <assert.h>#include <iostream>#include <boost/bind.hpp>#include <boost/function.hpp>#include...原创 2020-01-09 14:25:07 · 161 阅读 · 0 评论 -
boost 序列化1
#include "stdafx.h"#include <iostream>using namespace std;#include <boost/archive/binary_iarchive.hpp>#include <boost/archive/binary_oarchive.hpp>using namespace boost::archive...原创 2020-01-09 14:26:39 · 93 阅读 · 0 评论 -
时间2 boost:date 年月日
// 忽略警告// 调试日期:2019-03-13 星期3#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <assert.h>#include <iostream>#include <boost/integer.hpp>#include <time...原创 2020-01-09 14:24:24 · 134 阅读 · 0 评论 -
Boost_Test 最小化的测试套件minimal_test
/************************************************************************//*最小化的测试套件minimal_test minimal_test提供以下四个测试断言宏:BOOST_CHECK(e) 断言测试通过, 如不通过不影响程序执行BOOST_REQUIRE(e) 要求断言必须通过, 否...原创 2020-01-09 14:22:35 · 163 阅读 · 0 评论 -
Boost_Test 单元测试框架UTF
/************************************************************************//*单元测试框架UTF(Unit Test Framework)一个用于单元测试的基于命令行界面的测试套件UTF,具有单元测试、检测内存泄露、监控程序运行的功能。test库将测试程序定义为一个测试模块,由测试安装,测试主体,测试清理和测试运行器...原创 2020-01-09 14:22:37 · 243 阅读 · 0 评论 -
Boost_Test 测试夹具
/************************************************************************//*测试夹具: 测试安装和测试清理好比c++中的构造函数和析构函数,“测试夹具”实现了自动的测试安装和测试清理。基本形式为:struct test_fixture_name // 测试夹具类, 通常是struct, 将被UTF继承{test...原创 2020-01-09 14:22:31 · 315 阅读 · 0 评论 -
boost::filesystem
// #include <boost/filesystem.hpp>#include <boost/filesystem/fstream.hpp>#include <iostream> using namespace boost::filesystem;// boost::filesystem::path 是 Boost.Filesystem 中的...原创 2020-01-09 14:24:10 · 574 阅读 · 0 评论 -
boost::result_of/ref
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <assert.h>#include <iostream>#include <boost/utility/result_of.hpp>// result_of#include <boost...原创 2020-01-09 14:25:53 · 99 阅读 · 0 评论 -
线程2 boost::condition_variable
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <assert.h>#include <iostream>#include <boost/thread.hpp>#include <stack>using namespace bo...原创 2020-01-09 14:26:55 · 131 阅读 · 0 评论 -
boost 随机数
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <iostream>#include <boost/random.hpp>#include <boost/nondet_random.hpp>//random_device#include &...原创 2020-01-09 14:25:15 · 239 阅读 · 0 评论 -
boost 有理数
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <iostream>#include <boost/integer_traits.hpp> // 类型特性#include <boost/cstdint.hpp> // 整数...原创 2020-01-09 14:26:39 · 117 阅读 · 0 评论 -
boost::bimap
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <iostream>#include <boost/bimap.hpp>// map的双向映射#include <boost/typeof/typeof.hpp>// BOOST_AUTO#i...原创 2020-01-09 14:26:09 · 126 阅读 · 0 评论 -
boost::dynamic_bitset
#include <boost/dynamic_bitset.hpp>using namespace boost;int main(){ // 构造函数 dynamic_bitset<> db; // 空 dynamic_bitset<> db1(10); // 大小为10 dynam...原创 2020-01-09 14:25:44 · 322 阅读 · 0 评论 -
boost::tuple
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <assert.h>#include <iostream>#include <boost/tuple/tuple.hpp>#include <boost/ref.hpp>//boos...原创 2020-01-09 14:26:18 · 131 阅读 · 0 评论 -
boost::variant
#define _SCL_SECURE_NO_WARNINGS#include <iostream>using namespace std;#include <boost/variant.hpp>#include <boost/variant/apply_visitor.hpp>//apply_visitor#include <boost/v...原创 2020-01-09 14:25:32 · 230 阅读 · 0 评论 -
boost::shared_ptr
#include <vector>#include <iostream>#include <boost/shared_ptr.hpp>using namespace std;struct Foo{ Foo(int _x) : x(_x){} ~Foo() { cout << "~Foo()" &...原创 2020-01-09 14:25:19 · 96 阅读 · 0 评论 -
boost::bind
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <assert.h>#include <iostream>#include <boost/bind.hpp>#include <boost/function.hpp>#includ...原创 2020-01-09 14:24:57 · 112 阅读 · 0 评论 -
boost::signal2
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <assert.h>#include <iostream>#include <boost/signals2/signal.hpp>#include <boost/signals2/shar...原创 2020-01-09 14:24:49 · 196 阅读 · 0 评论 -
boost::circular_buffer 循环缓冲结构
#include <iostream>using namespace std;#include <boost/circular_buffer.hpp>#include <boost/assign.hpp>using namespace boost;using namespace boost::assign;int main(){ b...原创 2020-01-09 14:26:20 · 180 阅读 · 0 评论 -
boost::unordered_map/set
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <boost/unordered_map.hpp>#include <boost/unordered_set.hpp>#include <iostream>#include <hash_...原创 2020-01-09 14:26:11 · 111 阅读 · 0 评论 -
boost::any
#include <iostream>#include <boost/any.hpp>#include <boost/shared_ptr.hpp>#include <boost/assign/list_of.hpp>using namespace std;using namespace boost;// 类型检测template&l...原创 2020-01-09 14:26:29 · 120 阅读 · 0 评论 -
时间3 boost::time_duration/ptime
// 忽略警告// 调试日期:2019-03-14 星期4#define BOOST_DATE_TIME_POSIX_TIME_SET_CONFIG// 让time_duration精确到纳秒(Linux下)//#define BOOST_DATE_TIME_SOURCE#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4...原创 2020-01-09 14:24:36 · 734 阅读 · 0 评论 -
线程1 boost::thread
// 忽略警告#define _SCL_SECURE_NO_WARNINGS#pragma warning(disable : 4996)#include <assert.h>#include <iostream>#include <boost/thread.hpp>using namespace boost;using namespace st...原创 2020-01-09 14:26:59 · 119 阅读 · 0 评论 -
boost 字符串处理
#include <iostream>using namespace std;//进行字符串、整数/浮点数之间的字面转换#include <boost/lexical_cast.hpp>void test_lexical_cast(){ int a = lexical_cast<int>("123");//<>中的为目标...原创 2020-01-09 14:24:02 · 209 阅读 · 0 评论