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

网站建设 阳江个人微信管理工具

网站建设 阳江,个人微信管理工具,公司用的邮箱有哪些,网页制作流程不包括指定该类型对象可以从右值构造 指定该类型的实例可以从一个右值实参构造。 要求 以下情况下#xff0c;类型 T 满足可移动构造 (MoveConstructible) #xff1a; 给定 T 类型的右值表达式 rv任意标识符 u 下列表达式必须合法且拥有其指定的效果 表达式后条件T u rv;u…指定该类型对象可以从右值构造 指定该类型的实例可以从一个右值实参构造。 要求 以下情况下类型 T 满足可移动构造 (MoveConstructible) 给定 T 类型的右值表达式 rv任意标识符 u 下列表达式必须合法且拥有其指定的效果 表达式后条件T u rv;u 的值等于 rv 在初始化前的值。rv 的新值未指明。T(rv)T(rv) 的值等于 rv 在初始化前的值。rv 的新值未指明。 注解 类不必为满足此要求而实现移动构造函数接收 const T 实参的复制构造函数也能绑定右值表达式。 若可移动构造 (MoveConstructible) 类实现了移动构造函数则它亦可实现移动语义以从“构造后 rv 的值未指明”的事实中获利。 调用示例 #include iostream #include type_traits//编译器生成默认构造函数 struct A { };struct B {std::string str; // 成员拥有非平凡默认构造函数 };struct C {std::string str; // 成员拥有非平凡默认构造函数C() throw (int) //构造函数抛异常{} };struct MyClass {int ma;int mb;MyClass(): ma(101), mb(102){std::cout this __FUNCTION__ __LINE__ a: ma b: mb std::endl;}MyClass(int a, int b): ma(a), mb(b){std::cout this __FUNCTION__ __LINE__ a: ma b: mb std::endl;}MyClass(const MyClass obj){this-ma obj.ma;this-mb obj.mb;std::cout this __FUNCTION__ __LINE__ a: ma b: mb std::endl;}MyClass(MyClass obj){this-ma obj.ma;this-mb obj.mb;std::cout this __FUNCTION__ __LINE__ a: ma b: mb std::endl;} };int main() {std::cout std::boolalpha;std::cout std::is_move_constructibleint::value: std::is_move_constructibleint::value std::endl;std::cout std::is_trivially_move_constructibleint::value: std::is_trivially_move_constructibleint::value std::endl;std::cout std::is_nothrow_move_constructibleint::value: std::is_nothrow_move_constructibleint::value std::endl;std::cout std::endl;std::cout std::is_move_constructibleA::value: std::is_move_constructibleA::value std::endl;std::cout std::is_trivially_move_constructibleA::value: std::is_trivially_move_constructibleA::value std::endl;std::cout std::is_nothrow_move_constructibleA::value: std::is_nothrow_move_constructibleA::value std::endl;std::cout std::endl;std::cout std::is_move_constructibleB::value: std::is_move_constructibleB::value std::endl;std::cout std::is_trivially_move_constructibleB::value: std::is_trivially_move_constructibleB::value std::endl;std::cout std::is_nothrow_move_constructibleB::value: std::is_nothrow_move_constructibleB::value std::endl;std::cout std::endl;std::cout std::is_move_constructibleC::value: std::is_move_constructibleC::value std::endl;std::cout std::is_trivially_move_constructibleC::value: std::is_trivially_move_constructibleC::value std::endl;std::cout std::is_nothrow_move_constructibleC::value: std::is_nothrow_move_constructibleC::value std::endl;std::cout std::endl;//T u rv; u 的值等于 rv 在初始化前的值。rv 的新值未指明。MyClass myClass1 std::move(MyClass(101, 102));//T(rv) T(rv) 的值等于 rv 在初始化前的值。rv 的新值未指明。MyClass(std::move(MyClass(101, 102)));return 0; } 输出 std::is_move_constructibleint::value: true std::is_trivially_move_constructibleint::value: true std::is_nothrow_move_constructibleint::value: truestd::is_move_constructibleA::value: true std::is_trivially_move_constructibleA::value: true std::is_nothrow_move_constructibleA::value: truestd::is_move_constructibleB::value: true std::is_trivially_move_constructibleB::value: false std::is_nothrow_move_constructibleB::value: truestd::is_move_constructibleC::value: true std::is_trivially_move_constructibleC::value: false std::is_nothrow_move_constructibleC::value: true0x61fe78 MyClass 35 a:101 b:102 0x61fe70 MyClass 53 a:101 b:102 0x61fe88 MyClass 35 a:101 b:102 0x61fe80 MyClass 53 a:101 b:102
http://www.zqtcl.cn/news/281097/

相关文章:

  • 诸暨网站制作设计公众号文章怎么导入到wordpress
  • 网站死链怎么办青岛网站制作企业
  • 已经有域名 怎么修改网站网站推广找客户
  • 网站的制作建站人增加网站流量
  • 向国旗致敬做时代新人网站广州网站建设公司排名
  • 阿里云域名怎么做网站对网站进行seo优化
  • 响应式网站建设合同11月将现新冠感染高峰
  • 做网站客户一般会问什么问题百度云网盘资源分享网站
  • 网站设计中超链接怎么做艺术设计
  • 卡盟网站建设wordpress优化代码
  • 做网站需要什么技术员商城型网站开发网站建设
  • discuz做地方门户网站网站大全免费完整版
  • 莆田人做的网站一天赚2000加微信
  • 阿里云网站访问不了怎么办做网站二维码
  • 手机商城网站建设可采用的基本方式有
  • 网站备案管理做广告公司网站建设价格
  • 绵阳专业网站建设公司上海外贸公司排名榜
  • 如何做英文系统下载网站快速排名工具免费
  • 苏州建网站必去苏州聚尚网络网页视频提取在线工具
  • 网站建设服务市场分析百度集团
  • 网站怎么企业备案信息做网站业务员如何跟客户沟通
  • 如何网站推广知名的集团门户网站建设费用
  • 网站入口设计规范专门做喷涂设备的网站
  • 最简单网站开发软件有哪些企业管理培训课程培训机构
  • 桂城网站制作公司wordpress 导航网站
  • 一个公司做网站需要注意什么条件网站备案 登陆
  • 百度网站介绍显示图片装修公司一般多少钱一平方
  • 网站销售如何做业绩我找伟宏篷布我做的事ko家的网站
  • 建立网站有哪些步骤?jsp网站开发详细教程
  • 网站怎么做直播功能旅游做攻略用什么网站