C++ Logo

std-proposals

Advanced search

Re: Make reference_wrapper have a pointer layout

From: Thiago Macieira <thiago_at_[hidden]>
Date: Wed, 30 Sep 2020 08:38:55 -0700
On Wednesday, 30 September 2020 08:17:20 PDT connor horman via Std-Proposals
wrote:
> Based on something brought up on my post to this list "Making bit_cast
> useful", I believe its reasonable to require that std::reference_wrapper<T>
> have the same layout as T*. As mentioned, because this makes more sense as
> a requirement on reference_wrapper, I am moving it to a separate thread.

Please articulate why it should be so. What problems would a different
implementation cause?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2020-09-30 10:39:01