Boost
幻想之渔
永远相信美好的事情即将发生!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
boost之progress_timer计时器
progress_timer计时器继承自timer,具有timer的全部能力。除此之外,它会在析构时自动输出时间,省去了timer调用elapsed()的工作。 #include "stdafx.h" #include int main() { boost::progress_timer t; //声明对象开始计时 int i = 10000000000; //操作 whil原创 2017-04-06 20:24:54 · 480 阅读 · 0 评论 -
boost程序的编译
boost程序编译:g++ -o samlpe.out boost.cpp -I$BOOST_INCLUDE -L$BOOST_LIB -lboost_thread原创 2017-10-30 16:30:37 · 529 阅读 · 0 评论 -
boost::noncopyable使用
boost::noncopyable 为什么要boost::noncopyable 在c++中定义一个类的时候,如果不明确定义拷贝构造函数和拷贝赋值操作符,编辑器会为我们自动生成。 但是有时候我们不需要类的复制语义,希望禁止复制类的实例。这时一个很经典的C++惯用语法,只要私有化拷贝构造函数和拷贝赋值操作函数即可。 boost中的noncopyable为实现不可拷贝类提供了简单清晰的解...原创 2018-07-23 13:59:06 · 3640 阅读 · 0 评论 -
mac环境boost安装和配置
mac环境boost安装和配置 mac安装boost 安装命令 brew install boost 安装的过程中会显示安装的位置:/usr/local/Cellar/boost/1.67.0_1 minbo:homebrew minbo$ brew install boost Warning: boost 1.67.0_1 is already installed and ...原创 2018-09-08 17:07:12 · 5328 阅读 · 0 评论 -
Boost中计时器(timer)的使用
Boost中计时器(timer)的使用 #include <iostream> #include <boost/timer.hpp> int main() { boost::timer t; std::cout << "max " << t.elapsed_max()<< "s" <<原创 2018-09-08 17:59:49 · 2157 阅读 · 0 评论
分享