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

P0009R18 <mdspan> #3972

Merged
merged 77 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
69751ad
Implement P0009R18 `<mdspan>` et al. (#3502)
MattStephanson Feb 25, 2023
6bee593
Merge pull request #3512 from microsoft/main
StephanTLavavej Feb 28, 2023
02b0ecb
`<mdspan>`: Various cleanups (#3534)
JMazurkiewicz Mar 3, 2023
0314b17
`<mdspan>`: Implement *Mandates* clauses (#3535)
JMazurkiewicz Mar 4, 2023
ed8d6d2
Merge pull request #3537 from microsoft/main
StephanTLavavej Mar 5, 2023
05fb8e0
Merge branch 'main' into update-mdspan2
StephanTLavavej Mar 7, 2023
a1054ad
Merge pull request #3549 from StephanTLavavej/update-mdspan2
StephanTLavavej Mar 7, 2023
7901876
`<mdspan>`: Require concepts (#3560)
JMazurkiewicz Mar 12, 2023
5c2e59b
`<mdspan>`: Add `_EXPORT_STD`, tiny cleanups (#3563)
StephanTLavavej Mar 13, 2023
187a036
`<mdspan>`: Use concepts everywhere and add `mdspan` deduction guides…
JMazurkiewicz Mar 14, 2023
22838a9
Merge pull request #3569 from microsoft/main
StephanTLavavej Mar 14, 2023
404605b
`<mdspan>`: Add separate tests for `extents` and `default_accessor` (…
JMazurkiewicz Mar 17, 2023
b0a6a97
`<mdspan>`: Completely rework `std::extents` (#3586)
JMazurkiewicz Mar 24, 2023
701f43d
Merge pull request #3592 from microsoft/main
StephanTLavavej Mar 24, 2023
3ea5312
`<mdspan>`: Various cleanups (mostly renames) (#3593)
JMazurkiewicz Mar 27, 2023
f6687bf
Merge pull request #3597 from microsoft/main
StephanTLavavej Mar 28, 2023
53d73ee
`<mdspan>`: `layout_left` improvements (#3603)
JMazurkiewicz Mar 31, 2023
74a6e2f
`<mdspan>`: `layout_right` improvements (#3615)
JMazurkiewicz Apr 4, 2023
32853a6
`<mdspan>`: Improve accessor testing (#3616)
JMazurkiewicz Apr 4, 2023
f4934c6
`<mdspan>`: Cleanup `extents`'s deduction guide (#3632)
JMazurkiewicz Apr 7, 2023
46124c7
Merge branch 'main' into unlimited-mdspan
StephanTLavavej Apr 7, 2023
34fce78
`<mdspan>` needs `<limits>` for `numeric_limits`.
StephanTLavavej Apr 7, 2023
ba523a6
Merge pull request #3637 from StephanTLavavej/unlimited-mdspan
StephanTLavavej Apr 7, 2023
c9b661c
Merge pull request #3653 from microsoft/main
StephanTLavavej Apr 14, 2023
dc177d7
Merge pull request #3665 from microsoft/main
StephanTLavavej Apr 20, 2023
7899889
`<mdspan>`: Cleanup `mdspan` class a little bit (#3672)
JMazurkiewicz Apr 26, 2023
ea8995d
`<mdspan>`: `layout_stride` improvements (#3673)
JMazurkiewicz Apr 26, 2023
e4fb8fa
`<mdspan>`: Reduce amount of function calls in non-optimized debug mo…
JMazurkiewicz Apr 27, 2023
2bb397c
`<mdspan>`: Diversify integer types used in tests (#3682)
JMazurkiewicz May 11, 2023
1d70c09
`<mdspan>`: Add modules test (#3688)
JMazurkiewicz May 11, 2023
4bd089b
`<mdspan>`: Remove some C28020 warning suppressions (#3690)
JMazurkiewicz May 11, 2023
98a3f6a
`<mdspan>`: Document CTAD workaround (#3693)
JMazurkiewicz May 11, 2023
8eb2c9e
`<mdspan>`: Cite N4950 instead of N4944 (#3698)
JMazurkiewicz May 13, 2023
cdac55b
`<mdspan>`: Improve `layout_stride` tests (#3701)
JMazurkiewicz May 15, 2023
67b9723
`<mdspan>`: Add new debug checks to layout mappings (#3702)
JMazurkiewicz May 15, 2023
3e50f85
Merge branch 'main' into mdspan (and run the new clang-format)
CaseyCarter May 18, 2023
020444f
Merge pull request #3716 from CaseyCarter/mdspan
CaseyCarter May 18, 2023
42dedfd
`<mdspan>`: Cleanup for `_CONSTEVAL` (#3638)
frederick-vs-ja May 24, 2023
c600a08
`<mdspan>`: Implement multidimensional subscript operator (#3689)
JMazurkiewicz May 24, 2023
ec12ba7
`<mdspan>`: Down with `typename`! (#3694)
JMazurkiewicz May 24, 2023
5e7a0f4
`<mdspan>`: Cache `fwd-prod-of-extents` and `rev-prod-of-extents` whe…
JMazurkiewicz May 24, 2023
7a680e5
Merge pull request #3744 from microsoft/main
StephanTLavavej Jun 1, 2023
ab7bb23
`<mdspan>`: Test `mdspan` (#3749)
JMazurkiewicz Jun 10, 2023
858338c
Merge pull request #3774 from microsoft/main
StephanTLavavej Jun 15, 2023
34405b3
`<mdspan>`: Remove old tests (#3767)
JMazurkiewicz Jun 17, 2023
652e2b0
`<mdspan>`: `extents` improvements (#3786)
JMazurkiewicz Jun 21, 2023
1984147
`<mdspan>`: Improve debug checks (#3821)
JMazurkiewicz Jul 3, 2023
09b1286
`<mdspan>`: Finish `layout_stride`'s tests (#3829)
JMazurkiewicz Jul 3, 2023
2a12d44
`<mdspan>`: Make `extents` truly empty when `rank_dynamic() == 0` (#3…
JMazurkiewicz Jul 3, 2023
7943441
`<mdspan>`: More EBO (#3847)
JMazurkiewicz Jul 6, 2023
2c495f5
`<mdspan>`: Final cleanups (#3852)
JMazurkiewicz Jul 8, 2023
12aea70
Merge branch 'main' into mdspan-17.7p3
StephanTLavavej Jul 17, 2023
ec37cf5
Replace workaround for DevCom-10360833.
StephanTLavavej Jul 17, 2023
1ecdd64
Merge pull request #3885 from StephanTLavavej/mdspan-17.7p3
StephanTLavavej Jul 17, 2023
1f9ecbf
Drop `#pragma once` from `<mdspan>` (#3901)
frederick-vs-ja Jul 26, 2023
74e82a6
mdspan STL's review comments - easy part (#3944)
AlexGuteniev Aug 10, 2023
a513db0
Merge branch 'main' into merge-mdspan
StephanTLavavej Aug 11, 2023
ba19390
Merge pull request #3948 from StephanTLavavej/merge-mdspan
StephanTLavavej Aug 11, 2023
425317d
Final `mdspan` test fixes (#3954)
StephanTLavavej Aug 12, 2023
b60ac58
`<mdspan>`: Product code review (#3971)
StephanTLavavej Aug 15, 2023
e229833
Update `#endif` comment for consistency.
StephanTLavavej Aug 16, 2023
a3231d0
Merge branch 'main' into mdspan
StephanTLavavej Sep 5, 2023
015f590
Fix stealth merge conflict with GH 3977.
StephanTLavavej Sep 5, 2023
d7fb94e
Fix Clang 17 failures in P0009R18_mdspan_mdspan
CaseyCarter Sep 12, 2023
a25bbfe
Clarify error messages
CaseyCarter Sep 12, 2023
89e7506
Remove unnecessary _Size template parameter from extents constructor
CaseyCarter Sep 12, 2023
f2b4b5d
Convert private extents constructor constraints to _STL_INTERNAL_STAT…
CaseyCarter Sep 12, 2023
ea8ea4a
Extract _Construct_from_tuple from extents and rename to _Extents_fro…
CaseyCarter Sep 12, 2023
a3e66ad
Check layout_(left|right)::mapping constructor precondition everywher…
CaseyCarter Sep 12, 2023
946ff56
"Helper" constructor of layout_stride::mapping should be private
CaseyCarter Sep 12, 2023
29ed185
test coverage for layout_stride::mapping with empty extents
CaseyCarter Sep 12, 2023
8a5c26d
Defend against non-`{}`-constructible types
CaseyCarter Sep 12, 2023
0b4c7b1
data_handle_type is always nothrow movable
CaseyCarter Sep 12, 2023
4c4a04b
Merge _Multidimensional_subscript overloads
CaseyCarter Sep 12, 2023
3382da9
Detach comments to correct strange wrapping in P0009R18_mdspan_layout…
CaseyCarter Sep 12, 2023
90fb129
Remove `constexpr` from undefined function declarations
CaseyCarter Sep 12, 2023
7fe7858
`_Ptr{}` => `_Ptr = data_handle_type()`
StephanTLavavej Sep 13, 2023
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 @@ -177,6 +177,7 @@ set(HEADERS
${CMAKE_CURRENT_LIST_DIR}/inc/list
${CMAKE_CURRENT_LIST_DIR}/inc/locale
${CMAKE_CURRENT_LIST_DIR}/inc/map
${CMAKE_CURRENT_LIST_DIR}/inc/mdspan
${CMAKE_CURRENT_LIST_DIR}/inc/memory
${CMAKE_CURRENT_LIST_DIR}/inc/memory_resource
${CMAKE_CURRENT_LIST_DIR}/inc/mutex
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 @@ -107,6 +107,7 @@
#include <list>
#include <locale>
#include <map>
#include <mdspan>
#include <memory>
#include <memory_resource>
#include <new>
Expand Down
1 change: 1 addition & 0 deletions stl/inc/header-units.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"list",
"locale",
"map",
"mdspan",
"memory",
"memory_resource",
"mutex",
Expand Down
1,464 changes: 1,464 additions & 0 deletions stl/inc/mdspan

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@
// Other C++20 deprecation warnings

// _HAS_CXX23 directly controls:
// P0009R18 <mdspan>
// P0288R9 move_only_function
// P0323R12 <expected>
// P0401R6 Providing Size Feedback In The Allocator Interface
Expand Down Expand Up @@ -374,9 +375,13 @@
// P2539R4 Synchronizing print() With The Underlying Stream
// P2540R1 Empty Product For Certain Views
// P2549R1 unexpected<E>::error()
// P2599R2 mdspan: index_type, size_type
// P2604R0 mdspan: data_handle_type, data_handle(), exhaustive
// P2613R1 mdspan: empty()
// P2652R2 Disallowing User Specialization Of allocator_traits
// P2693R1 Formatting thread::id And stacktrace
// P2713R1 Escaping Improvements In std::format
// P2763R1 Fixing layout_stride's Default Constructor For Fully Static Extents

// _HAS_CXX23 and _SILENCE_ALL_CXX23_DEPRECATION_WARNINGS control:
// P1413R3 Deprecate aligned_storage And aligned_union
Expand Down Expand Up @@ -1787,6 +1792,10 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_ios_noreplace 202207L
#define __cpp_lib_is_scoped_enum 202011L

#ifdef __cpp_lib_concepts
#define __cpp_lib_mdspan 202207L
#endif // defined(__cpp_lib_concepts)

#if !defined(__clang__) && !defined(__EDG__) // TRANSITION, Clang and EDG support for modules
#define __cpp_lib_modules 202207L
#endif // !defined(__clang__) && !defined(__EDG__)
Expand Down
1 change: 1 addition & 0 deletions stl/modules/std.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export module std;
#include <list>
#include <locale>
#include <map>
#include <mdspan>
#include <memory>
#include <memory_resource>
#include <mutex>
Expand Down
12 changes: 12 additions & 0 deletions tests/std/include/test_header_units_and_modules.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,17 @@ void test_map() {
assert(m[30] == 33);
}

void test_mdspan() {
using namespace std;
puts("Testing <mdspan>.");
int arr[] = {10, 0, 0, 0, 20, 0, 0, 0, 30};
layout_right::mapping<extents<int, 3, 3>> mp;
assert(arr[mp(0, 0)] == 10);
assert(arr[mp(1, 1)] == 20);
assert(arr[mp(2, 2)] == 30);
// TRANSITION, test std::mdspan too (DevCom-10359857)
}

void test_memory() {
using namespace std;
puts("Testing <memory>.");
Expand Down Expand Up @@ -1099,6 +1110,7 @@ void all_cpp_header_tests() {
test_list();
test_locale();
test_map();
test_mdspan();
test_memory();
test_memory_resource();
test_mutex();
Expand Down
Loading