LWG-4406 `optional::value_or` return statement is inconsistent with Mandates

Open
#6,576 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
54/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
backend

Research direction

Read the optional::value_or implementation and comments, then compare its return statement with LWG-4406 and the superseded LWG-3424 resolution. Remove the obsolete LWG-3424 comments and update the implementation to match the current Mandates; done when the code reflects LWG-4406 and the relevant optional tests pass.

Written by the indexing model from the issue text.

Description

LWG

LWG-4406 optional::value_or return statement is inconsistent with Mandates

This resolution supersedes LWG-3424 "optional::value_or should never return a cv-qualified type" which we had implemented with comments, so we need to clean all of that out.

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

Getting set up

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.

More from microsoft/STL

All issues in microsoft/STL

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.