microsoft / microsoft/STL

`<type_traits>`: Investigate EDG issues with layout-compatibility and pointer-interconvertibility intrinsics

Open
#2,858 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

compiler
Dominant language
C++
Stars
11.2k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

We have the following workarounds for internal VSO-1268984 "REPORTED: [EDG] New compiler intrinsics for Layout-compatibility and Pointer-interconvertibility Traits need to be understood by EDG":

https://github.com/microsoft/STL/blob/969b2e250df56690768fdf8344293624d6ab0d6c/stl/inc/type_traits#L1759-L1785
https://github.com/microsoft/STL/blob/969b2e250df56690768fdf8344293624d6ab0d6c/stl/inc/yvals_core.h#L1395-L1407
https://github.com/microsoft/STL/blob/969b2e250df56690768fdf8344293624d6ab0d6c/tests/std/tests/P0466R5_layout_compatibility_and_pointer_interconvertibility_traits/test.cpp#L17
https://github.com/microsoft/STL/blob/969b2e250df56690768fdf8344293624d6ab0d6c/tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp#L1001-L1017
https://github.com/microsoft/STL/blob/969b2e250df56690768fdf8344293624d6ab0d6c/tests/std/tests/VSO_0157762_feature_test_macros/test.compile.pass.cpp#L1041-L1057

This was resolved as fixed on 2022-03-07 by internal VS-PR-383770, available in VS 2022 17.2.

However, attempting to enable these features for EDG with VS 2022 17.3 Preview 3 fails with numerous compiler errors affecting several tests. We need to investigate and report these failures. The affected tests in std are:

  • GH_000431_copy_move_family
  • GH_000431_equal_family
  • GH_000431_equal_memcmp_is_safe
  • GH_000431_iter_copy_move_cat
  • P0466R5_layout_compatibility_and_pointer_interconvertibility_traits

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the workaround locations in stl/inc/type_traits, stl/inc/yvals_core.h, and the referenced feature-test and P0466R5 tests. Enable the layout-compatibility and pointer-interconvertibility features for EDG with VS 2022 17.3 Preview 3, then examine the failures in the five listed std tests. Done means the EDG failures are understood and reported with affected tests and compiler errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.