码迷,mamicode.com
首页 >  
搜索关键字:5 c++ boost 智能指针    ( 2698个结果
linux下mutex与atomic性能比较
一种是用boost::atomic;一种直接加锁;代码很简单: #include #include #include #include #include #include #include #include static int loop_num = 10000; boost::atomic a(0); static boost::mutex mtx_; static v...
分类:系统相关   时间:2015-01-28 01:01:01    阅读次数:352
boost.asio包装类st_asio_wrapper开发教程(2013.12.8更新)(二)
如果你是偶然浏览到这里,请先看源代码及例程下载地址:命令行:svn checkout http://st-asio-wrapper.googlecode.com/svn/trunk/ st-asio-wrapper-read-only如果从svn客户端界面上打开,则只输入http://st-asio...
分类:移动开发   时间:2015-01-28 00:56:32    阅读次数:327
boost.asio包装类st_asio_wrapper开发教程(一)
一:什么是st_asio_wrapper它是一个c/s网络编程框架,基于对boost.asio的包装(最低在boost-1.49.0上调试过),目的是快速的构建一个c/s系统;二:st_asio_wrapper的特点效率高、跨平台、完全异步,当然这是从boost.asio继承而来;自动重连,数据透明...
分类:移动开发   时间:2015-01-28 00:51:34    阅读次数:328
boost::any( 能存放任何类型的数据)原理
===================== template class any { public:     T m_data; }; void main() {     any a;     } 缺点是 必须知道类型,有时我们并不知道某个对象的类型。 ------------- class any { public:     template     any...
分类:其他好文   时间:2015-01-27 18:21:59    阅读次数:177
Python.boost学习笔记(4)
这一章首先通过一个封装简单的类来讲解如何封装类的constructor, method和data member.  #include #include using namespace boost::python; class animal { public: animal() { myLanguage=""; }; animal(std::string la...
分类:编程语言   时间:2015-01-26 15:17:13    阅读次数:273
boost::asio::io_service(之一)
boost::asio::io_service /// Provides core I/O functionality. /**  * The io_service class provides the core I/O functionality for users of the  * asynchronous I/O objects, including:  * io_service...
分类:其他好文   时间:2015-01-26 00:04:23    阅读次数:355
C++开发--在Visual Studio2013中使用boost::split()编译过程中出现error C4996
Visual Studio is being overly cautious. In debug mode, visual studio uses something called "Checked Iterators". Pointers are also iterators, but the c...
分类:编程语言   时间:2015-01-25 17:58:11    阅读次数:448
Boost signal 代码示例
网上介绍Boost signal原理的文章很多,这里不介绍原理,仅贴一些示例代码,这在初步接触Boost signal时能够有个较好的感性认识,深入了解需要去体会挖掘boost源码。代码基本上来自Boost turioal,其中有一些错误会导致编译不过,这里都做了更正: 1. 基本运用 #include #include #include using namespace std; u...
分类:其他好文   时间:2015-01-23 18:30:30    阅读次数:374
win7 vs2012/2013 编译boost 1.55
bjaminstallstage--toolset=msvc-11.0--stagedir="C:\Boost\boost_vc_110"link=sharedruntime-link=sharedthreading=multidebugrelease当前boost最新版本为1.55,下载地址:ht...
分类:Windows程序   时间:2015-01-23 12:46:41    阅读次数:206
boost::deadline_timer
boost::deadline_timer 定义 typedef basic_deadline_timer deadline_timer; basic_deadline_timer是个模板类。 构造函数 deadline_timer有三个构造函数: 1 explicit basic_deadline_timer(boost::asio::io_service& io_servi...
分类:其他好文   时间:2015-01-22 21:55:34    阅读次数:562
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!