65,209
社区成员
发帖
与我相关
我的任务
分享
template <class _Ty, _Ty _Val> //----???
struct integral_constant {
static constexpr _Ty value = _Val;
using value_type = _Ty;
using type = integral_constant;
constexpr operator value_type() const noexcept {
return value;
}
_NODISCARD constexpr value_type operator()() const noexcept {
return value;
}
};
template<typename T , int MaxLen>
template <class _Ty, _Ty _Val>
这是微软版std::move()的源代码[/quote]
std::move和微软没有关系,是C++标准委员会在C++11版本中引入的一个概念——移动语义。有时间看一下std::move的介绍吧,[/quote]
不同编译器的标准函数实现一样嘛?比如微软的std::move()和GUN的std::move()的,之前看STL的时候微软和GUN,同样的vector,list但他们的代码不一样的,虽然原理都一样
,哈哈,又学到一点新知识.
这是微软版std::move()的源代码[/quote]
std::move和微软没有关系,是C++标准委员会在C++11版本中引入的一个概念——移动语义。有时间看一下std::move的介绍吧,
这是微软版std::move()的源代码