[英]Is there a standard C++ function, that is analogue to Address-of operator &?
是否有一个标准的C ++函数,它类似于Address-of运算符&,我可以用作stl实体的函数对象,如std :: transform和std :: compose1?
std::addressof
could suit your purpose. std::addressof
可能适合您的目的。 Note that the behaviour is slightly different to plain operator&
if the type has an overload for that operator. 请注意,行为与普通
operator&
略有不同,如果类型具有该运算符的重载。
我认为你要找的是std::addressof
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.