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

苏州建设网站哪家好google关键词分析工具

苏州建设网站哪家好,google关键词分析工具,名雕装饰公司的口碑怎样,电子商务网站分类指定该类型对象可以从右值构造 指定该类型的实例可以从一个右值实参构造。 要求 以下情况下,类型 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.hkea.cn/news/285069/

相关文章:

  • 公司做网站提供产品加盟费互联网销售怎么做
  • 视频网站开发架构百度app最新版本
  • 网站上内容列表怎么做的网站模板中心
  • 上海利恩建设集团有限公司网站国内好用的搜索引擎
  • 网站模板论坛今日重大军事新闻
  • 昆山自适应网站建设电商平台的营销方式
  • 盘龙区网站建设外包高级搜索引擎技巧
  • 什么做的网站吗58百度搜索引擎
  • wordpress 企业站开发口碑营销的概念
  • 广州免费核酸检测点东莞seo项目优化方法
  • 学风建设网站版块设计个人网站
  • 网站底部连接怎么做福州seo推广
  • 生猪价格今日猪价行情关键词优化是什么工作
  • 网站建设公司下载搜索引擎查询
  • 韩国吃秀在哪个网站做直播企业宣传
  • 江西网站建设成都百度
  • 糯米团网站怎么做微信软文范例100字
  • 如何在社交网站上做视频推广seo营销的概念
  • 大连做网站仟亿科技最新域名查询
  • 网站开发实施计划与安排宁波网络推广方式
  • 企业网站建设公司注意哪些问题软件开发外包公司
  • abc网站建设怎么样yandex引擎搜索入口
  • wordpress屏蔽f12广州seo网络优化公司
  • 南宁网站建设推广服务云服务器免费
  • 大数据营销是什么seo站长
  • 建设政府网站的公司乐山网站seo
  • 仿站容易还是建站容易专业做灰色关键词排名
  • 做网站背景音乐管理课程培训
  • 网站建设可以自学吗品牌软文范文
  • 网站风格对比哪里有学计算机培训班