📄 test_rel_ops.cxx
字号:
/*
fsm
*/
struct Y
{
int x;
Y(int x_) : x(x_) { }
bool operator==(Y const &that) const { return x == that.x; }
bool operator< (Y const &that) const { return x < that.x; }
};
#include <vcl_rel_ops.h>
int function()
{
Y x(2), y(3);
if (x == y) return 1;
if (x != y) return 2;
if (x < y) return 3;
if (x > y) return 4;
if (x <= y) return 5;
if (x >= y) return 6;
return 0;
}
int test_rel_ops_main(int /*argc*/,char* /*argv*/[])
{
function();
return 0;
}
VCL_REL_OPS_INSTANTIATE(Y);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -