Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<expected> Implement P0323R12 #2643

Merged
merged 29 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8a7b0a1
<expected> Implement P0323: expected
miscco Mar 29, 2022
f1f5ff1
Address review comments
miscco Apr 9, 2022
af61334
Add some transition comments and paper number
miscco Apr 9, 2022
b6300ad
Use guard type rather than try catch blocks
miscco Apr 10, 2022
a6a7c24
Use consistent condition for feature test checks
miscco Apr 11, 2022
366377d
Merge branch 'main' into p0323-expected
miscco Apr 18, 2022
c4e5abd
Address review comments
miscco Apr 18, 2022
e305bfa
More mandates instead of constraints
miscco Apr 19, 2022
64d19d4
Add debugger visualisation as suggested by @SuperWig
miscco Apr 19, 2022
6e0094a
Address review comments
miscco Apr 29, 2022
dcb6544
use is_same_v instead of same_as
CaseyCarter May 1, 2022
d213de9
Merge branch 'main' into p0323-expected
miscco May 2, 2022
3da07d6
Merge branch 'main' into p0323-expected
miscco May 17, 2022
854159d
Drop __cpp_explicit_this_parameter.
StephanTLavavej May 19, 2022
e339374
Code review feedback, fixing several bugs.
StephanTLavavej May 20, 2022
1d8c6e5
Drop tests comparing `expected<void, ...>` to `expected<NonVoid, ...>`.
StephanTLavavej May 20, 2022
4a00d41
Add tests for `expected<void, E>` constructors.
StephanTLavavej May 20, 2022
3198d49
Formatting: Drop `//` within `clang-format off`.
StephanTLavavej May 20, 2022
2b2eff4
Fix formatting damage
miscco May 20, 2022
b5ac746
Do not call trivial destructors
miscco May 20, 2022
3dd480b
Test review feedback.
StephanTLavavej May 20, 2022
86e4f11
Test: Use typedefs to shorten long lines.
StephanTLavavej May 20, 2022
691621a
Rename No to Not.
StephanTLavavej May 20, 2022
4f5cc25
Sort Not/Yes patterns, so they're tested in "binary order" consistently.
StephanTLavavej May 20, 2022
bb06fa1
Add IsYes() to reduce verbosity.
StephanTLavavej May 20, 2022
45a39ec
`expected<void, E>::error()` is now mandated to be noexcept.
StephanTLavavej May 20, 2022
0796610
Work around VSO-1543660.
StephanTLavavej May 21, 2022
2fec1f2
Casey's review comments
CaseyCarter May 23, 2022
bb261ad
Guard `_Old_val.~_Second()`, enable header unit test internally.
StephanTLavavej May 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ set(HEADERS
${CMAKE_CURRENT_LIST_DIR}/inc/deque
${CMAKE_CURRENT_LIST_DIR}/inc/exception
${CMAKE_CURRENT_LIST_DIR}/inc/execution
${CMAKE_CURRENT_LIST_DIR}/inc/expected
${CMAKE_CURRENT_LIST_DIR}/inc/experimental/coroutine
${CMAKE_CURRENT_LIST_DIR}/inc/experimental/deque
${CMAKE_CURRENT_LIST_DIR}/inc/experimental/filesystem
Expand Down
39 changes: 39 additions & 0 deletions stl/debugger/STL.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,45 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
</Type>


CaseyCarter marked this conversation as resolved.
Show resolved Hide resolved
<Type Name="std::unexpected&lt;*&gt;">
<Intrinsic Name="unex" Expression="_Unexpected"/>
CaseyCarter marked this conversation as resolved.
Show resolved Hide resolved
<DisplayString>{unex()}</DisplayString>
<Expand>
<Item Name="unex">unex()</Item>
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
</Expand>
</Type>

<Type Name="std::bad_expected_access&lt;*&gt;">
<Intrinsic Name="unex" Expression="_Unexpected"/>
<DisplayString>{unex()}</DisplayString>
<Expand>
<Item Name="unex">unex()</Item>
</Expand>
</Type>

<Type Name="std::expected&lt;*,*&gt;">
<Intrinsic Name="has_value" Expression="_Has_value"/>
<Intrinsic Name="value" Expression="_Value"/>
<Intrinsic Name="unex" Expression="_Unexpected"/>
<DisplayString Condition="has_value()">{value()}</DisplayString>
<DisplayString Condition="!has_value()">{unex()}</DisplayString>
<Expand>
<Item Condition="has_value()" Name="value">value()</Item>
<Item Condition="!has_value()" Name="unex">unex()</Item>
</Expand>
</Type>

<Type Name="std::expected&lt;void,*&gt;">
<Intrinsic Name="has_value" Expression="_Has_value"/>
<Intrinsic Name="unex" Expression="_Unexpected"/>
<DisplayString Condition="has_value()">void</DisplayString>
<DisplayString Condition="!has_value()">{unex()}</DisplayString>
<Expand>
<Item Condition="!has_value()" Name="unex">unex()</Item>
</Expand>
</Type>


<Type Name="std::bitset&lt;*&gt;">
<DisplayString>{{ size={$T1} }}</DisplayString>
<Expand>
Expand Down
1 change: 1 addition & 0 deletions stl/inc/__msvc_all_public_headers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
#include <complex>
#include <deque>
#include <exception>
#include <expected>
#include <filesystem>
#include <format>
#include <forward_list>
Expand Down
Loading