llvm / llvm/llvm-project

[libc++] LWG4406: `optional::value_or` return statement is inconsistent with Mandates

Open
#189,545 3 comments 0 reactions 0 assignees View on GitHub
libc++
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

**NOT VOTED YET**

Link: https://wg21.link/LWG4406

`optional::value_or` and `expected::value_or` use `static_cast()` (explicit conversion) in their return statements, but the Mandates clause requires `is_convertible_v` (implicit conversion).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.