随笔分类 -  boost source show

将boost里的代码预处理后得到的代码贴出来,更容易读懂(我个人觉得),用到了bcb2010的一个预处理源码的功能。
VS2015编译boost1.62
摘要:VS2015编译boost1.62 Boost库是一个可移植、提供源代码的C++库,作为标准库的后备,是C++标准化进程的开发引擎之一。 Boost库由C++标准委员会库工作组成员发起,其中有些内容有望成为下一代C++标准库内容。在C++社区中影响甚大,是不折不扣的“准”标准库。Boost由于其对跨 阅读全文
posted @ 2018-04-28 22:34 袁晓平 阅读(210) 评论(0) 推荐(0)
vs2013编译boost库
摘要:打开vs2013>>visual studio tools>>VS2013 x64 本机工具命令提示cdD:\lib\boost_1_55_0\boost_1_55_0bootstrap.batD:\lib\boost_1_55_0\boost_1_55_0>b2 --build-dir="D:\l... 阅读全文
posted @ 2014-05-04 16:39 袁晓平 阅读(464) 评论(0) 推荐(0)
使用boost iostream写文件
摘要:下截boost库,解压,不需要编译,配置属性》C/C++》常规》附加包含目录,添加boost解压后的目录地址,如下图,打开vs2012,新建一个控制台应用程序,源代码如下:#include <ostream>#include <boost/iostreams/device/file.hpp>#include <boost/iostreams/stream.hpp>namespace io = boost::iostreams;int main(){ io::stream_buffer<io::file_sink> buf("log.tx 阅读全文
posted @ 2012-10-20 21:08 袁晓平 阅读(1595) 评论(0) 推荐(0)
应用boost库serialize标准库里的map
摘要:需求,最近做ios程序,需要将用户密码和帐号保存到本地磁盘,而用用户不止一个,想到boost库里的serialization比较适合,用户就用标准库里的map来保存,也就是std::map<std::string, std::string>,代码如下:UserInfo.h://// UserInfo.h// app1//// Created by xp y on 12-8-23.// Copyright (c) 2012年 xp y. All rights reserved.//#ifndef __app1__UserInfo__#define __app1__UserInfo__ 阅读全文
posted @ 2012-08-23 21:45 袁晓平 阅读(1693) 评论(0) 推荐(0)
boost之字符串与整型的转换
摘要:#include <boost\cast.hpp>#include <boost\lexical_cast.hpp>signed char c = boost::numeric_cast<signed char>(97);int ii = boost::lexical_cast<int>("127");std::string s = boost::lexical_cast<std::string>(97); 阅读全文
posted @ 2011-05-02 16:00 袁晓平 阅读(1424) 评论(0) 推荐(0)
boost之regex使用范例
摘要:#include <regex>#include <list>对wchar_t*字符串的search调用方法:boost::wcmatch match; boost::wregex reg(L"\\d{3}你"); boost::regex_search(L"345你好啊!", match, reg); bool mt0 = match[0].matched; bool mt1 = match[1].matched; bool mt2 = match[2].matched; int ln = match.length();对std 阅读全文
posted @ 2011-05-02 15:57 袁晓平 阅读(796) 评论(0) 推荐(0)
scoped_ptr源码
摘要:/* E:\Program Files\CodeGear\RAD Studio\7.0\include\boost_1_35\boost/checked_delete.hpp 24: */namespace boost{ template<class T> inline void checked_delete(T * x) { typedef char type_must_be_co... 阅读全文
posted @ 2009-08-28 15:01 袁晓平 阅读(438) 评论(0) 推荐(0)