Ray's playground

 

随笔分类 -  Boost

boost::array
摘要:boost::array — STL compliant container wrapper for arrays of constant size1#include<iostream>2#include<string>3#include<boost/array.hpp>4usingnamespacestd;5usingnamespaceboost;67intmain()8{9array<int,4>intArray={1,2,3};10for(array<int,4>::iteratorit=intArray.begin();it! 阅读全文

posted @ 2011-04-10 21:19 Ray Z 阅读(325) 评论(0) 推荐(0)

boost::addressof
摘要:#include<iostream>#include<boost/utility.hpp>usingnamespacestd;classObject{public:inti;Object():i(0x11223344){}intoperator&(){return0;}};intmain(){Objectobj;cout<<&obj<<endl;Object*p=boost::addressof(obj);Object*p1=std::addressof(obj);cout<<p<<endl;cout< 阅读全文

posted @ 2011-03-14 22:53 Ray Z 阅读(389) 评论(0) 推荐(0)

Boost.Any
摘要:Anything GoesCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include<iostream>2#include<string>3#include<utility>4#include<vect... 阅读全文

posted @ 2010-08-01 13:54 Ray Z 阅读(884) 评论(0) 推荐(0)

导航