随笔分类 -  boost

摘要:http://blog.csdn.net/huang_xw/article/details/8248960# boost::noncopyable比较简单, 主要用于单例的情况.通常情况下, 要写一个单例类就要在类的声明把它们的构造函数, 赋值函数, 析构函数, 复制构造函数隐藏到private或者 阅读全文
posted @ 2017-04-02 19:19 zzyoucan 阅读(2795) 评论(1) 推荐(2) 编辑
摘要:# if 0#include #include #include void handler1(const boost::system::error_code &ec) { std::cout #include #include void handler1(const boost:... 阅读全文
posted @ 2015-03-18 16:11 zzyoucan 阅读(753) 评论(0) 推荐(0) 编辑
摘要:#include #include void handle1(const boost::system::error_code& ec){ std::cout << "5.s" << std::endl;}void handle2(const boost::system::error_code&... 阅读全文
posted @ 2015-03-18 13:31 zzyoucan 阅读(194) 评论(0) 推荐(0) 编辑
摘要:/** * boost::noncopyable 实现单例不用麻烦了,直接从这个继承就行了 */#include class myclass : public boost::noncopyable{public: myclass(){}; myclass(int i){}; ... 阅读全文
posted @ 2014-12-01 16:35 zzyoucan 阅读(249) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include #include #include #include #pragma warning (disable: 4244) //解决boost 中binary序列化:“std::streamsize”转换到“size_t”usi... 阅读全文
posted @ 2014-09-15 00:14 zzyoucan 阅读(1219) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include #include using namespace std;//stringstream只是一个中转的作用,因为write_json还是read_json操作的是stringstream.void packetage(char**... 阅读全文
posted @ 2014-09-14 21:43 zzyoucan 阅读(1592) 评论(0) 推荐(0) 编辑
摘要:发送端#include "DBProc1.h"#include #include #include using namespace boost::interprocess;PLUG_COMPONENT_AUTO_REG(DBProc1)//DO NOT EDIT THISstruct MyStruc... 阅读全文
posted @ 2014-08-10 13:51 zzyoucan 阅读(2339) 评论(0) 推荐(0) 编辑
摘要:#include#include #include using namespace std;using namespace boost::property_tree;//其实有点像std::list,自己可以构造一个任何类型的节点插进去,特别数组类型,用法太灵活了int main(){ std::s... 阅读全文
posted @ 2014-07-22 21:24 zzyoucan 阅读(221) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示