当前位置: 首页 > news >正文

青岛官网建站typecho 和WordPress

青岛官网建站,typecho 和WordPress,wordpress更改数据库域名链接,网络营销考试题及答案任何定义了函数调用操作符的对象都是函数对象。C 支持创建、操作新的函数对象#xff0c;同时也提供了许多内置的函数对象。 运算符函数对象 C 针对常用的算术和逻辑运算定义了很多函数对象#xff1a; 位运算 实现 x ^ y 的函数对象 std::bit_xor template class T 支持创建、操作新的函数对象同时也提供了许多内置的函数对象。 运算符函数对象 C 针对常用的算术和逻辑运算定义了很多函数对象 位运算 实现 x ^ y 的函数对象 std::bit_xor template class T struct bit_xor; (C14 前) template class T void struct bit_xor; (C14 起) 进行逐位异或的函数对象。等效地调用类型 T 上的 operator^ 。 特化 标准化提供 std::bit_xor 在不指定 T 时的特化它使得参数类型和返回类型留待推导。 bit_xorvoid 实现 x ^ y 并推导参数和返回类型的函数对象 (类模板特化)(C14 起) 成员类型 类型定义result_type(C17 中弃用)Tfirst_argument_type(C17 中弃用)Tsecond_argument_type(C17 中弃用)T(C20 前) 成员函数 operator() 返回二个参数逐位异或的结果 (公开成员函数) std::bit_xor::operator() T operator()( const T lhs, const T rhs ) const; (C14 前) constexpr T operator()( const T lhs, const T rhs ) const; (C14 起) 返回 lhs 与 rhs 逐位异或的结果。 参数 lhs, rhs-要计算逐位异或的值 返回值 lhs ^ rhs 的结果。 异常 无 可能的实现 constexpr T operator()(const T lhs, const T rhs) const {return lhs ^ rhs; } 调用示例 #include iostream #include functionalstruct Cell {int x;int y;Cell() default;Cell(int a, int b): x(a), y(b) {}Cell(const Cell cell){x cell.x;y cell.y;}Cell operator(const Cell cell){x cell.x;y cell.y;return *this;}Cell operator(const Cell cell){x cell.x;y cell.y;return *this;}Cell operator*(int n){x * n;y * n;return *this;}Cell operator(){x 1;y 1;return *this;}friend Cell operator (const Cell cell1, const Cell cell2){Cell cell cell1;cell cell2;return cell;}friend Cell operator *(const Cell cell1, const Cell cell2){Cell cell {cell1.x * cell2.x, cell1.y * cell2.y};return cell;}friend Cell operator /(const Cell cell1, const Cell cell2){Cell cell {cell1.x / cell2.x, cell1.y / cell2.y};return cell;}friend Cell operator %(const Cell cell1, const Cell cell2){Cell cell {cell1.x % cell2.x, cell1.y % cell2.y};return cell;}friend bool operator (const Cell cell1, const Cell cell2){return cell1.x cell2.x cell1.y cell2.y;}friend bool operator !(const Cell cell1, const Cell cell2){return cell1.x ! cell2.x cell1.y ! cell2.y;}friend bool operator (const Cell cell1, const Cell cell2){if (cell1.x cell2.x){return cell1.y cell2.y;}else{return cell1.x cell2.x;}}friend bool operator (const Cell cell1, const Cell cell2){if (cell1.x cell2.x){return cell1.y cell2.y;}else{return cell1.x cell2.x;}}friend bool operator (const Cell cell1, const Cell cell2){return cell1.x cell2.x cell1.y cell2.y;}friend bool operator ||(const Cell cell1, const Cell cell2){return cell1.x || cell2.x || cell1.y || cell2.y;}friend bool operator !(const Cell cell){return !(cell.x cell.x);}friend Cell operator (const Cell cell1, const Cell cell2){Cell cell {cell1.x cell2.x, cell1.y cell2.y};return cell;}friend Cell operator |(const Cell cell1, const Cell cell2){Cell cell {cell1.x | cell2.x, cell1.y | cell2.y};return cell;}friend Cell operator ^(const Cell cell1, const Cell cell2){Cell cell {cell1.x ^ cell2.x, cell1.y ^ cell2.y};return cell;} };std::ostream operator(std::ostream os, const Cell cell) {os { cell.x , cell.y };return os; }int main() {std::cout std::boolalpha;int *ptr nullptr; // std::cout std::bit_xorint*()(ptr, nullptr): // std::bit_xorint*()(ptr, nullptr) std::endl;std::cout std::bit_xorchar()(50, 2): std::bit_xorchar()(50, 2) std::endl;std::cout std::bit_xorchar()(a, 97): std::bit_xorchar()(a, 97) std::endl;std::cout std::bit_xorint()(1023, 1024): std::bit_xorint()(1023, 1024) std::endl;std::cout std::bit_xorlong()(1023, 1024): std::bit_xorlong()(1023, 1024) std::endl;std::cout std::bit_xorlong long()(1023, 1024): std::bit_xorlong long()(1023, 1024) std::endl;std::cout std::bit_xoruint8_t()(1023, 1024): std::bit_xoruint8_t()(8, 32) std::endl;std::cout std::bit_xoruint16_t()(123, 456): std::bit_xoruint16_t()(123, 456) std::endl;std::cout std::bit_xoruint32_t()(101, 202): std::bit_xoruint32_t()(101, 202) std::endl;std::cout std::bit_xoruint64_t()(10230, 10240): std::bit_xoruint64_t()(10230, 10240) std::endl;std::cout std::bit_xorint8_t()(1023, 1024): std::bit_xorint8_t()(8, 32) std::endl;std::cout std::bit_xorint16_t()(123, 456): std::bit_xorint16_t()(123, 456) std::endl;std::cout std::bit_xorint32_t()(101, 202): std::bit_xorint32_t()(101, 202) std::endl;std::cout std::bit_xorint64_t()(10230, 10240): std::bit_xorint64_t()(10230, 10240) std::endl;// std::cout std::bit_xordouble()(3.14, 3.14): // std::bit_xordouble()(3.14, 3.14) std::endl; // std::cout std::bit_xorfloat()(3.14, 3.14): // std::bit_xorfloat()(3.14, 3.14) std::endl; // std::cout std::bit_xorfloat()(3, 3): // std::bit_xorfloat()(3, 3) std::endl; // std::cout std::bit_xorfloat()(3.56, 3.14): // std::bit_xorfloat()(3.56, 3.14) std::endl; // std::cout std::bit_xorint()(3.14, 3.14): // std::bit_xorint()(3.34, 3.34) std::endl;std::cout std::bit_xorCell()(Cell{101, 101}, Cell{202, 202}): std::bit_xorCell()(Cell{101, 101}, Cell{202, 202}) std::endl;//编译失败 // std::cout std::bit_xorstd::string()(\I am a \, \handsome programmer\): // std::bit_xorstd::string()(I am a , handsome programmer) std::endl;return 0; }输出 std::bit_xorchar()(50, 2): 0 std::bit_xorchar()(a, 97): std::bit_xorint()(1023, 1024): 2047 std::bit_xorlong()(1023, 1024): 2047 std::bit_xorlong long()(1023, 1024): 2047 std::bit_xoruint8_t()(1023, 1024): ( std::bit_xoruint16_t()(123, 456): 435 std::bit_xoruint32_t()(101, 202): 175 std::bit_xoruint64_t()(10230, 10240): 4086 std::bit_xorint8_t()(1023, 1024): ( std::bit_xorint16_t()(123, 456): 435 std::bit_xorint32_t()(101, 202): 175 std::bit_xorint64_t()(10230, 10240): 4086 std::bit_xorCell()(Cell{101, 101}, Cell{202, 202}): {175,175}
http://www.zqtcl.cn/news/573402/

相关文章:

  • 莱芜 做网站 公司官网开发
  • tomcat做网站做自媒体查找素材的网站
  • 信阳建设企业网站公司软件开发平台公司
  • 营销型网站建设营销型设计家官网视频
  • 部门网站建设目的加猛挣钱免费做网站软件
  • 洛阳制作网站哪家好wordpress是英文
  • dw里面怎么做网站轮播图网站建设分为多少模块
  • 国外互动网站wordpress设置用户头像
  • 重庆手机网站推广定做net创建网站之后怎么做
  • 网站仿静态做it的兼职网站
  • 建站用wordpress好吗hui怎么做网站
  • 从用户旅程角度做网站分析做网站还是做淘宝
  • 妇科医院网站优化服务商品牌型网站设计推荐
  • 西安网站制作排名网站建设对企业的帮助
  • lamp网站开发 pdf纯html5 网站
  • 白云区同和网站建设购物网站怎么建立
  • 公司制作网站需要espcms易思企业网站管理系统
  • 开发一个网站需要哪些步骤广西建设主管部门网站
  • 网站建设培训西安制作微信小程序开发
  • delphi 做直播网站wordpress 商务
  • 各大网站的软文怎么做wordpress教程菜鸟教程
  • 破解php网站后台账号密码wordpress二维码 插件下载
  • 石家庄哪里可以做网站做网站用的pm是啥
  • 租服务器网站有趣的设计网站
  • 建设部监理网站官网信阳市两学一做网站
  • 网站被攻击会影响收录么微信网站 影楼
  • 社区网站开发search搜索引擎
  • 章丘做网站哪家强原阳网站建设
  • 做网站前期构架图中国建设银行手机银行网站
  • tp5企业网站开发百度云青岛vi设计公司