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

微信企业号网站开发软件互联网推广销售是做什么的

微信企业号网站开发软件,互联网推广销售是做什么的,优化方案英语必修三电子版,wordpress黑糖主题破解指定该类型对象可以从右值构造 指定该类型的实例可以从一个右值实参构造。 要求 以下情况下,类型 T 满足可移动构造 (MoveConstructible) : 给定 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_constructible<int>::value: "<< std::is_move_constructible<int>::value << std::endl;std::cout << "std::is_trivially_move_constructible<int>::value: "<< std::is_trivially_move_constructible<int>::value << std::endl;std::cout << "std::is_nothrow_move_constructible<int>::value: "<< std::is_nothrow_move_constructible<int>::value << std::endl;std::cout << std::endl;std::cout << "std::is_move_constructible<A>::value: "<< std::is_move_constructible<A>::value << std::endl;std::cout << "std::is_trivially_move_constructible<A>::value: "<< std::is_trivially_move_constructible<A>::value << std::endl;std::cout << "std::is_nothrow_move_constructible<A>::value: "<< std::is_nothrow_move_constructible<A>::value << std::endl;std::cout << std::endl;std::cout << "std::is_move_constructible<B>::value: "<< std::is_move_constructible<B>::value << std::endl;std::cout << "std::is_trivially_move_constructible<B>::value: "<< std::is_trivially_move_constructible<B>::value << std::endl;std::cout << "std::is_nothrow_move_constructible<B>::value: "<< std::is_nothrow_move_constructible<B>::value << std::endl;std::cout << std::endl;std::cout << "std::is_move_constructible<C>::value: "<< std::is_move_constructible<C>::value << std::endl;std::cout << "std::is_trivially_move_constructible<C>::value: "<< std::is_trivially_move_constructible<C>::value << std::endl;std::cout << "std::is_nothrow_move_constructible<C>::value: "<< std::is_nothrow_move_constructible<C>::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_constructible<int>::value: true
std::is_trivially_move_constructible<int>::value: true
std::is_nothrow_move_constructible<int>::value: truestd::is_move_constructible<A>::value: true
std::is_trivially_move_constructible<A>::value: true
std::is_nothrow_move_constructible<A>::value: truestd::is_move_constructible<B>::value: true
std::is_trivially_move_constructible<B>::value: false
std::is_nothrow_move_constructible<B>::value: truestd::is_move_constructible<C>::value: true
std::is_trivially_move_constructible<C>::value: false
std::is_nothrow_move_constructible<C>::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.dt0577.cn/news/17425.html

相关文章:

  • 自考大型网站开发工具百度百科官网入口
  • 网站搜索不到公司网站昭通网站seo
  • 宜良县建设局网站域名申请的流程
  • 网站建设电话销售话术模板大全指数基金是什么意思
  • 嘉定南翔网站建设如何交换友情链接
  • 哪个网站可以做身份核验b2b采购平台
  • 如何做登陆界面的网站中国最新消息
  • c c也能干大事网站开发信息流优化师培训
  • 网站开发技术知识百度平台商家
  • 中英文双版网站怎么做制作网站推广
  • 菏泽 兼职做网站百度推广首页
  • 网站运营与数据分析互联网论坛
  • 有没有专门招代理的网站观看b站的广告网站平台
  • 政府网站设计什么是电商?电商怎么做
  • 做老师好还是网站编辑好淘宝宝贝排名查询
  • 历下区网站建设公司福州百度网站排名优化
  • 微信平台开发技术seo手机端优化
  • wordpress修改页面固定连接优化设计六年级上册语文答案
  • 企业网站鉴赏友情链接价格
  • 太原做网站南宁百度seo
  • 枣庄房产网网站推广优化教程
  • 做网站p图工具优化绿松石什么意思
  • 企业没有网站怎么做seo优化搜索关键词排名
  • onethink 网站小程序开发模板
  • 拖拽式制作网站新闻媒体发稿平台
  • c#网站开发技术视频号直播推广二维码
  • 日本电商网站百度快速收录教程
  • 惠州企业网站seo公司武汉今日头条最新消息
  • 天津建设工程注册中心网站青岛网站制作推广
  • 网站网页建设论文百度竞价排名事件