boost tribool example
来源:互联网 发布:东风技术中心面试知乎 编辑:程序博客网 时间:2024/06/07 04:43
/*
* =====================================================================================
*
* Filename: tribool.cpp
*
* Description: test boost tribool
*
* Version: 1.0
* Created: 10/01/2009 07:33:17 PM
* Revision: none
* Compiler: gcc
*
* Author: rare
* Company:
*
* =====================================================================================
*/
#include <iostream>
#include <boost/logic/tribool.hpp>
#include <boost/foreach.hpp>
void print(boost::tribool b)
{
if (b)
{
std::cout<< "b is true" << std::endl;
}
else if (!b)
{
std::cout << "b is false" << std::endl;
}
else
{
std::cout << "b is indeterminate" << std::endl;
}
}
int main()
{
boost::tribool tbs[3] = {true, false, boost::indeterminate};
BOOST_FOREACH(boost::tribool b, tbs)
{
print(b);
}
}
//output
b is true
b is false
b is indeterminate
- boost tribool example
- boost tribool
- boost tribool
- Boost中的tribool类型
- boost实用工具之tribool库
- boost example
- boost asio Example
- Boost mpi gatherv example
- boost thread test example C++
- boost thread/conditional variable test example
- boost C++ read from serial port with timeout example
- boost c++ lib on linux (1) - regex example with binary boost lib Regex
- example
- example
- Example
- example
- Example
- Example
- 卡巴总是显示keylogger ,检测到威胁,怎样排除
- vim 基本命令
- 需求变化的控制
- 理解拷贝构造函数(引用)
- 数据排序
- boost tribool example
- c++ is on the way 4
- 准备考研了
- 两种数据库流dataset和datatable(C#)
- 运行applet的三种方式
- C# .Net 2.0实例学习:WebBrowser页面与WinForm交互技巧(一)
- 写博,锻炼写文章的努力,必须做到
- C#三种模拟自动登录和提交POST信息的实现方法
- C# .Net 2.0实例学习:WebBrowser页面与WinForm交互技巧(二)