llvm / llvm/llvm-project

Non-portable test for SFINAE-friendly std::to_address

Open
#170,768 0 comments 1 reaction 0 assignees View on GitHub
libc++ test-suite
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

https://github.com/llvm/llvm-project/blob/47de55f28438a4a3c3c96157fba66694587d8040/libcxx/test/std/utilities/memory/pointer.conversion/to_address_without_pointer_traits.pass.cpp#L56

This test was added by #65177 which claims to be implementing [LWG3545](https://wg21.link/LWG3545), but that issue only said that `pointer_traits` should be SFINAE-friendly. It didn't require that `to_address` should be SFINAE-friendly.

There is a separate (and unresolved) issue about making `to_address` SFINAE-friendly: [LWG4058](https://wg21.link/lwg4058).

Until LWG4058 is resolved, this test is not portable and relies on a non-standard libc++ extension.

Contributor guide

Open the contributing guide

Research direction

Start with libcxx/test/std/utilities/memory/pointer.conversion/to_address_without_pointer_traits.pass.cpp at line 56, then read the linked discussion of LWG3545 and unresolved LWG4058. Check which behavior the test requires and ensure the test only covers behavior required by the standard rather than a libc++ extension.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.