随笔分类 - boost
摘要:http://blog.csdn.net/huang_xw/article/details/8248960# boost::noncopyable比较简单, 主要用于单例的情况.通常情况下, 要写一个单例类就要在类的声明把它们的构造函数, 赋值函数, 析构函数, 复制构造函数隐藏到private或者
阅读全文
摘要:# if 0#include #include #include void handler1(const boost::system::error_code &ec) { std::cout #include #include void handler1(const boost:...
阅读全文
摘要:#include #include void handle1(const boost::system::error_code& ec){ std::cout << "5.s" << std::endl;}void handle2(const boost::system::error_code&...
阅读全文
摘要:/** * boost::noncopyable 实现单例不用麻烦了,直接从这个继承就行了 */#include class myclass : public boost::noncopyable{public: myclass(){}; myclass(int i){}; ...
阅读全文
摘要:#include #include #include #include #include #include #include #pragma warning (disable: 4244) //解决boost 中binary序列化:“std::streamsize”转换到“size_t”usi...
阅读全文
摘要:#include #include #include #include #include using namespace std;//stringstream只是一个中转的作用,因为write_json还是read_json操作的是stringstream.void packetage(char**...
阅读全文
摘要:发送端#include "DBProc1.h"#include #include #include using namespace boost::interprocess;PLUG_COMPONENT_AUTO_REG(DBProc1)//DO NOT EDIT THISstruct MyStruc...
阅读全文
摘要:#include#include #include using namespace std;using namespace boost::property_tree;//其实有点像std::list,自己可以构造一个任何类型的节点插进去,特别数组类型,用法太灵活了int main(){ std::s...
阅读全文