[libcxx-commits] [PATCH] D96660: [libcxx] adds concept `std::common_reference_with`

Casey Carter via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 17 07:56:38 PST 2021


CaseyCarter added a comment.

In D96660#2567420 <https://reviews.llvm.org/D96660#2567420>, @cjdb wrote:

> In D96660#2566031 <https://reviews.llvm.org/D96660#2566031>, @CaseyCarter wrote:
>
>> In D96660#2564818 <https://reviews.llvm.org/D96660#2564818>, @miscco wrote:
>>
>>> As far as I can tell the last clause from common_reference is specifically made for something like reference_wrapper types
>>
>> It's specifically for "Pre-LWG-2993 <https://cplusplus.github.io/LWG/issue2993> `reference_wrapper`"-like types; modern `reference_wrapper` doesn't need it. In fact the only test case I know of for that last clause is to implement pre-LWG-2993 `reference_wrapper` and check `common_reference_t<old_reference_wrapper<meow>, meow&>`.
>
> @CaseyCarter does MSVC test this? I couldn't find it when I looked for an example.

https://github.com/microsoft/STL/blob/a31bd6ed6b4f1c18045bc329b38c08845ec0fc3d/tests/std/tests/VSO_0000000_type_traits/test.cpp#L1474-L1485


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96660/new/

https://reviews.llvm.org/D96660



More information about the libcxx-commits mailing list