Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2766103
[libc++] Implement P2897R7 aligned_accessor: An mdspan accessor expre…
dalg24 Jan 11, 2025
e36bc1c
Run the generate scripts
dalg24 Jan 12, 2025
1c57f20
Add missing header include for default_accessor
dalg24 Jan 13, 2025
68ea167
Missing header includes in tests
dalg24 Jan 13, 2025
1db762c
Fix access and offset tests
dalg24 Jan 13, 2025
625a421
Merge branch 'main' of https://github.com/llvm/llvm-project into alig…
dalg24 Jan 31, 2025
d2eccee
Add a release note
dalg24 Jan 31, 2025
64f14e7
Update release version 20 -> 21
dalg24 Jan 31, 2025
baefcf9
Fix header include <cstd{int -> def}> and qualify std::size_t
dalg24 Jan 31, 2025
47d3c56
Move verify tests to test/libcxx/
dalg24 Jan 31, 2025
eda7039
Drop superfluous constexpr, fix includes, and qualify std::size_t
dalg24 Jan 31, 2025
2cd1d28
Drop stray commented empty lines and superfluous constexpr
dalg24 Jan 31, 2025
8376d2f
Fix access and offset tests to work with constexpr
dalg24 Jan 31, 2025
a863a60
Correct oversight stray constexpr
dalg24 Feb 1, 2025
80e4a2d
Merge branch 'main' of https://github.com/llvm/llvm-project into alig…
dalg24 Mar 10, 2025
4abd141
Add coverage for which sizeof(T) is not equal to alignof(T)
dalg24 Mar 10, 2025
70f331a
Do not assume that sizeof(T) is the same as alignof(T) in test
dalg24 Mar 10, 2025
ac9792a
Merge branch 'main' into aligned_accessor
ldionne Mar 31, 2025
c3dfcda
Merge branch 'main' of https://github.com/llvm/llvm-project into alig…
dalg24 Apr 3, 2025
14c4606
Merge branch 'main' into aligned_accessor
dalg24 Apr 7, 2025
a55bef7
Merge branch 'main' into aligned_accessor
frederick-vs-ja Apr 9, 2025
9b5ef48
Merge branch 'main' of https://github.com/llvm/llvm-project into alig…
dalg24 Apr 14, 2025
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
Prev Previous commit
Merge branch 'main' of https://github.com/llvm/llvm-project into alig…
…ned_accessor
  • Loading branch information
dalg24 committed Apr 14, 2025
commit 9b5ef483d6e3c549893dbe9f3d821e73e6e32921
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,20 @@

// Test the feature test macros defined by <mdspan>

/* Constant Value
__cpp_lib_aligned_accessor 202411L [C++26]
__cpp_lib_freestanding_mdspan 202311L [C++26]
__cpp_lib_mdspan 202207L [C++23]
202406L [C++26]
__cpp_lib_submdspan 202306L [C++26]
*/
// clang-format off

#include <mdspan>
#include "test_macros.h"

#if TEST_STD_VER < 14

# ifdef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should not be defined before c++26"
# endif
# ifdef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should not be defined before c++26"
# endif

# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined before c++26"
# endif
# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined before c++26"
# endif

# ifdef __cpp_lib_mdspan
# error "__cpp_lib_mdspan should not be defined before c++23"
Expand All @@ -44,13 +38,13 @@

#elif TEST_STD_VER == 14

# ifdef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should not be defined before c++26"
# endif
# ifdef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should not be defined before c++26"
# endif

# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined before c++26"
# endif
# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined before c++26"
# endif

# ifdef __cpp_lib_mdspan
# error "__cpp_lib_mdspan should not be defined before c++23"
Expand All @@ -62,13 +56,13 @@

#elif TEST_STD_VER == 17

# ifdef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should not be defined before c++26"
# endif
# ifdef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should not be defined before c++26"
# endif

# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined before c++26"
# endif
# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined before c++26"
# endif

# ifdef __cpp_lib_mdspan
# error "__cpp_lib_mdspan should not be defined before c++23"
Expand All @@ -80,13 +74,13 @@

#elif TEST_STD_VER == 20

# ifdef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should not be defined before c++26"
# endif
# ifdef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should not be defined before c++26"
# endif

# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined before c++26"
# endif
# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined before c++26"
# endif

# ifdef __cpp_lib_mdspan
# error "__cpp_lib_mdspan should not be defined before c++23"
Expand All @@ -98,13 +92,13 @@

#elif TEST_STD_VER == 23

# ifdef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should not be defined before c++26"
# endif
# ifdef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should not be defined before c++26"
# endif

# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined before c++26"
# endif
# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined before c++26"
# endif

# ifndef __cpp_lib_mdspan
# error "__cpp_lib_mdspan should be defined in c++23"
Expand All @@ -119,25 +113,25 @@

#elif TEST_STD_VER > 23

# ifndef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should be defined in c++26"
# endif
# if __cpp_lib_aligned_accessor != 202411L
# error "__cpp_lib_aligned_accessor should have the value 202411L in c++26"
# endif

# if !defined(_LIBCPP_VERSION)
# ifndef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should be defined in c++26"
# endif
# if __cpp_lib_freestanding_mdspan != 202311L
# error "__cpp_lib_freestanding_mdspan should have the value 202311L in c++26"
# endif
# else // _LIBCPP_VERSION
# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined because it is unimplemented in libc++!"
# endif
# endif
# ifndef __cpp_lib_aligned_accessor
# error "__cpp_lib_aligned_accessor should be defined in c++26"
# endif
# if __cpp_lib_aligned_accessor != 202411L
# error "__cpp_lib_aligned_accessor should have the value 202411L in c++26"
# endif

# if !defined(_LIBCPP_VERSION)
# ifndef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should be defined in c++26"
# endif
# if __cpp_lib_freestanding_mdspan != 202311L
# error "__cpp_lib_freestanding_mdspan should have the value 202311L in c++26"
# endif
# else
# ifdef __cpp_lib_freestanding_mdspan
# error "__cpp_lib_freestanding_mdspan should not be defined because it is unimplemented in libc++!"
# endif
# endif

# ifndef __cpp_lib_mdspan
# error "__cpp_lib_mdspan should be defined in c++26"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,7 @@

// Test the feature test macros defined by <memory>

/* Constant Value
__cpp_lib_addressof_constexpr 201603L [C++17]
__cpp_lib_allocate_at_least 202302L [C++23]
__cpp_lib_allocator_traits_is_always_equal 201411L [C++17]
__cpp_lib_assume_aligned 201811L [C++20]
__cpp_lib_atomic_value_initialization 201911L [C++20]
__cpp_lib_constexpr_dynamic_alloc 201907L [C++20]
__cpp_lib_constexpr_memory 201811L [C++20]
202202L [C++23]
__cpp_lib_enable_shared_from_this 201603L [C++17]
__cpp_lib_is_sufficiently_aligned 202411L [C++26]
__cpp_lib_make_unique 201304L [C++14]
__cpp_lib_out_ptr 202106L [C++23]
202311L [C++26]
__cpp_lib_ranges 202110L [C++20]
202406L [C++23]
__cpp_lib_raw_memory_algorithms 201606L [C++17]
__cpp_lib_shared_ptr_arrays 201611L [C++17]
201707L [C++20]
__cpp_lib_shared_ptr_weak_type 201606L [C++17]
__cpp_lib_smart_ptr_for_overwrite 202002L [C++20]
__cpp_lib_smart_ptr_owner_equality 202306L [C++26]
__cpp_lib_to_address 201711L [C++20]
__cpp_lib_transparent_operators 201210L [C++14]
201510L [C++17]
*/
// clang-format off

#include <memory>
#include "test_macros.h"
Expand Down Expand Up @@ -77,13 +52,13 @@
# error "__cpp_lib_enable_shared_from_this should not be defined before c++17"
# endif

# ifdef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should not be defined before c++26"
# endif
# ifdef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should not be defined before c++26"
# endif

# ifdef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should not be defined before c++14"
# endif
# ifdef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should not be defined before c++14"
# endif

# ifdef __cpp_lib_out_ptr
# error "__cpp_lib_out_ptr should not be defined before c++23"
Expand Down Expand Up @@ -155,16 +130,16 @@
# error "__cpp_lib_enable_shared_from_this should not be defined before c++17"
# endif

# ifdef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should not be defined before c++26"
# endif
# ifdef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should not be defined before c++26"
# endif

# ifndef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should be defined in c++14"
# endif
# if __cpp_lib_make_unique != 201304L
# error "__cpp_lib_make_unique should have the value 201304L in c++14"
# endif
# ifndef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should be defined in c++14"
# endif
# if __cpp_lib_make_unique != 201304L
# error "__cpp_lib_make_unique should have the value 201304L in c++14"
# endif

# ifdef __cpp_lib_out_ptr
# error "__cpp_lib_out_ptr should not be defined before c++23"
Expand Down Expand Up @@ -248,16 +223,16 @@
# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++17"
# endif

# ifdef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should not be defined before c++26"
# endif
# ifdef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should not be defined before c++26"
# endif

# ifndef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should be defined in c++17"
# endif
# if __cpp_lib_make_unique != 201304L
# error "__cpp_lib_make_unique should have the value 201304L in c++17"
# endif
# ifndef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should be defined in c++17"
# endif
# if __cpp_lib_make_unique != 201304L
# error "__cpp_lib_make_unique should have the value 201304L in c++17"
# endif

# ifdef __cpp_lib_out_ptr
# error "__cpp_lib_out_ptr should not be defined before c++23"
Expand Down Expand Up @@ -362,16 +337,16 @@
# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++20"
# endif

# ifdef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should not be defined before c++26"
# endif
# ifdef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should not be defined before c++26"
# endif

# ifndef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should be defined in c++20"
# endif
# if __cpp_lib_make_unique != 201304L
# error "__cpp_lib_make_unique should have the value 201304L in c++20"
# endif
# ifndef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should be defined in c++20"
# endif
# if __cpp_lib_make_unique != 201304L
# error "__cpp_lib_make_unique should have the value 201304L in c++20"
# endif

# ifdef __cpp_lib_out_ptr
# error "__cpp_lib_out_ptr should not be defined before c++23"
Expand Down Expand Up @@ -488,16 +463,16 @@
# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++23"
# endif

# ifdef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should not be defined before c++26"
# endif
# ifdef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should not be defined before c++26"
# endif

# ifndef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should be defined in c++23"
# endif
# if __cpp_lib_make_unique != 201304L
# error "__cpp_lib_make_unique should have the value 201304L in c++23"
# endif
# ifndef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should be defined in c++23"
# endif
# if __cpp_lib_make_unique != 201304L
# error "__cpp_lib_make_unique should have the value 201304L in c++23"
# endif

# ifndef __cpp_lib_out_ptr
# error "__cpp_lib_out_ptr should be defined in c++23"
Expand Down Expand Up @@ -617,19 +592,19 @@
# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++26"
# endif

# ifndef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should be defined in c++26"
# endif
# if __cpp_lib_is_sufficiently_aligned != 202411L
# error "__cpp_lib_is_sufficiently_aligned should have the value 202411L in c++26"
# endif
# ifndef __cpp_lib_is_sufficiently_aligned
# error "__cpp_lib_is_sufficiently_aligned should be defined in c++26"
# endif
# if __cpp_lib_is_sufficiently_aligned != 202411L
# error "__cpp_lib_is_sufficiently_aligned should have the value 202411L in c++26"
# endif

# ifndef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should be defined in c++26"
# endif
# if __cpp_lib_make_unique != 201304L
# error "__cpp_lib_make_unique should have the value 201304L in c++26"
# endif
# ifndef __cpp_lib_make_unique
# error "__cpp_lib_make_unique should be defined in c++26"
# endif
# if __cpp_lib_make_unique != 201304L
# error "__cpp_lib_make_unique should have the value 201304L in c++26"
# endif

# ifndef __cpp_lib_out_ptr
# error "__cpp_lib_out_ptr should be defined in c++26"
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.