
boost
Car12
嵌入式开发,爱好者
展开
-
arm linux 交叉编译boost库
测试编译boost_1.48_0编译时thread编译失败测试编译boost_1.60_0编译时thread编译成功编译步骤:1、运行 ./bootstrap.sh 此时形成bjam文件和project-config.jam2、编辑project-config.jam,仅修改usinggcc这行。if ! gcc in [ feature.values <toolset> ]{ using gcc : arm : /usr/local/arm/...原创 2020-05-12 09:16:49 · 541 阅读 · 0 评论 -
windows 使用qtcreater编译boost 测试
windows 使用qtcreater编译boost 库命令; bjam install stage --toolset=gcc --stagedir="./lib" link=static runtime-link=static threading=multi debug release qtcreater添加头文件目录; INCLUDEPATH += C:/boost_1...原创 2020-03-02 17:22:08 · 268 阅读 · 0 评论 -
boost 获取时间
boost::posix_time::ptime datetime= boost::posix_time::second_clock::local_time(); auto date = datetime.date(); auto time = datetime.time_of_day(); temp = date.year(); temp =date.month();...原创 2019-07-24 17:04:17 · 689 阅读 · 0 评论 -
boost 容器tuple 信号signal2测试
// ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。//#include "pch.h"#include"stdio.h"#include<iostream>#include<string>using namespace std;#include<boost/unordered_ma...原创 2019-01-16 23:55:47 · 244 阅读 · 0 评论 -
正则表达式2-测试代码
// ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。//#include "pch.h"#include"stdio.h"#include<iostream>#include<boost/xpressive/xpressive.hpp>using namespace boost::xpress...原创 2019-01-16 19:28:00 · 265 阅读 · 0 评论 -
正则表达式学习
使用正则表达式的包含的库名:include<boost/xpressive/xpressive.hpp>引入命名空间using namespace boost::xpressive;basic_regex 正则表达式类: sregex 适用于标准字符串std::string cregex 适用于C标准字符串 char * 正则表达式工厂函数 srege...原创 2019-01-15 12:52:31 · 231 阅读 · 0 评论 -
boost::date_time时间类的使用
#include<boost/date_time/gregorian/gregorian.hpp>using namespace boost::gregorian;date类 1、构造: from_string();使用斜杠和连字符 from_undelmited_string();无分隔符; day_clock::local_day();返回...原创 2019-01-19 19:32:10 · 1629 阅读 · 0 评论 -
boost::filesystem 库的简单使用
#include<boost/filesystem.hpp>using namespace filesystem;path类 system_complete();返回绝对路径 string():返回标准格式的路径表示; dirrectory_string();返回文件系统的格式路径表示; parent_path():...原创 2019-01-19 17:56:22 · 7497 阅读 · 1 评论 -
boost 获取日期时间
using namespace boost::posix_time;using namespace boost::gregorian;time_duration hms(second_clock::local_time().time_of_day());int hour = hms.hours();int minutes= hms.minutes();原创 2018-08-27 15:04:39 · 933 阅读 · 1 评论 -
boost operator 实例代码
// BoostOperator.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <iostream>using namespace std;#include <boost/operators.hpp>using namespace boost;class Point :public less_than_c...原创 2018-07-14 14:56:23 · 254 阅读 · 0 评论 -
boost 单io_serverce 异步多线程资源保护代码
服务器:// ConsoleApplication12.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <cstdlib>#include <iostream>#include <memory>#include <utility>#include <boost/asio.hp...原创 2018-07-05 11:39:21 · 496 阅读 · 0 评论 -
boost::asio
#ifdef _MSC_VER#define _WIN32_WINNT 0X0501#endif#define BOOST_REGEX_NO_LIB#define BOOST_DATE_TIME_SOURCE#define BOOST_SYSTEM_NO_LIB#include<boost/asio.hh>using namespace boost::asio缓冲区 mutable_b...原创 2018-05-29 22:31:19 · 220 阅读 · 0 评论