C++ concepts: Compare
The concept Compare is a set of requirements expected by some of the standard
library facilities from the user-provided function object types.
The return value of the function call operation applied to an object of type Compare, when contextually
converted to bool,
yields true if
the first argument of the call appears before the second in the strict weak ordering relationinduced by this Compare type,
and false otherwise.
As with any BinaryPredicate,
evaluation of that expression is not allowed to call non-const member functions of the dereferenced iterators.
Requirements
The type T satisfies Compare if
- The type
TsatisfiesBinaryPredicate,
and
Given
comp, an object of typeCompareequiv(a, b), an expression equivalent to!comp(a,
b) && !comp(b, a)
The following expressions must be valid and have their specified effects
| Expression | Return type | Requirements |
|---|---|---|
| comp(a, b) |
implicitly convertible to bool | Establishes strict weak ordering relation with the following properties
|
| equiv(a, b) |
bool | Establishes equivalence relationship with the following properties
|
Note: comp induces a strict total ordering on the equivalence classes determined by equiv
C++ concepts: Compare的更多相关文章
- RS-232, RS-422, RS-485 Serial Communication General Concepts(转载)
前面转载的几篇文章重点介绍了UART及RS-232.在工控领域除了RS-232以外,常用的串行通信还有RS-485.本文转载的文章重点介绍了RS-232.RS-422和RS-485. Overview ...
- CMUSphinx Learn - Basic concepts of speech
Basic concepts of speech Speech is a complex phenomenon. People rarely understand how is it produced ...
- TortoiseGit 文件比对工具使用 Beyond Compare 和 DiffMerge
TortoiseGit 内置的文件比对工具是 TortoiseMerge,用于文件比对和解决冲突合并,TortoiseGit 还支持外部的比对工具使用,比如 Beyond Compare 和 Diff ...
- Git小技巧 - 指令别名及使用Beyond Compare作为差异比较工具
前言 本文主要写给使用命令行来操作Git的用户,用于提高Git使用的效率.至于使用命令还是GUI(Tortoise Git或VS的Git插件)就不在此讨论了,大家根据自己的的喜好选择就好.我个人是比较 ...
- 使用Red Gate Sql Data Compare 数据库同步工具进行SQL Server的两个数据库的数据比较、同步
Sql Data Compare 是比较两个数据库的数据是否相同.生成同步sql的工具. 这一款工具由Red Gate公司出品,我们熟悉的.NET Reflector就是这个公司推出的,它的SQLTo ...
- 使用Red Gate Sql Compare 数据库同步工具进行SQL Server的两个数据库的结构比较、同步
将测试版的项目同步(部署)到正式版的时候,两个数据库的结构比较与同步时,如果修改数据库的时候没有记录好修改了那些表,很难将两个数据库进行同步 RedGate Sql Compare使用简介说明: 1. ...
- [LeetCode] Compare Version Numbers 版本比较
Compare two version numbers version1 and version1.If version1 > version2 return 1, if version1 &l ...
- C# IComparable接口、IComparer接口和CompareTo(Object x)方法、Compare()方法
在项目中经常会用到字符串比较,但是有时候对字符串的操作比较多,规则各异.比如有的地方我们需要用排序规则,有的地方需要忽略大小写,我们该如何写一个比较容易操作的比较方法呢?重新实现IComparer接口 ...
- 【leetcode】Compare Version Numbers
题目描述: Compare two version numbers version1 and version2. If version1 > version2 return 1, if vers ...
随机推荐
- html .css 实现图片滑动和自动播放特效移动端 HTML 5中添加了以touch 开头的事件
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta ...
- ubuntu 14.04 GDAL
autotools-dev comerr-dev hdf5-helpers icu-devtools krb5-multidev libarmadillo4 libarpack2 libblas3 l ...
- aspose 解决插入html后字体问题
/// <summary> /// 添加html /// </summary> /// <param name="strText"></p ...
- SharePoint 入门书籍推荐 转载来源http://www.cnblogs.com/jianyus/p/3513238.html
最近,总有人说刚入门SharePoint,没有好的资料或者电子书,资料推荐大家多看看博客园和CSDN的博客.对于看博客,我一般是两个思路,要么找一个人的从头到尾看一遍,觉得有意义的,就把地址加收藏:或 ...
- ejabberd组成模块
转自:http://blog.sina.com.cn/u/1776260990 mod_adhoc 特定命令 (XEP-0050) mod_announce 管理公告推荐 mod_adhoc mod_ ...
- 安卓手机微信页面position: fixed位置错误
今天做项目的时候发现动用position: fixed做弹窗时,用margin-top:50%这样外边距来响应式的控制位置时,在微信里打开页面的弹窗,弹窗在手机上显示的位置和实际上在手机上的位置不一样 ...
- C# 循环语句
本次主要学习了for循环语句. for循环语句的基本格式是: for(初始条件;循环条件;状态改变) { 循环体; } break——中断循环,跳出循环. continue——停止本次循环,进入下次循 ...
- Python基础(四)-集合
补充: 数据类型分类: 1.按照数据可变不可变: 可变:列表.字典 不可变:数字.字符串.元组 x={':1} print(id(x)) x.update({':2}) print(x) print( ...
- html 图片上传预览
Html5 upload img 2012年12月27日 20:36 <!DOCTYPE HTML> <html> <head> <meta http-equ ...
- CDOJ 1324 卿学姐与公主 分块
题目地址 分块模板 #include<cstdio> #include<algorithm> #include<math.h> using namespace st ...