diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst --- a/libcxx/docs/ReleaseNotes.rst +++ b/libcxx/docs/ReleaseNotes.rst @@ -49,6 +49,7 @@ - P2438R2 - ``std::string::substr() &&`` - P0600R1 - ``nodiscard`` in the library - P0339R6 - ``polymorphic_allocator<>`` as a vocabulary type +- P2325R3 - Views should not be required to be default constructible Improvements and New Features ----------------------------- diff --git a/libcxx/docs/Status/Cxx20Issues.csv b/libcxx/docs/Status/Cxx20Issues.csv --- a/libcxx/docs/Status/Cxx20Issues.csv +++ b/libcxx/docs/Status/Cxx20Issues.csv @@ -230,7 +230,7 @@ "`3299 `__","Pointers don't need customized iterator behavior","Prague","|Complete|","15.0","|ranges|" "`3300 `__","Non-array ``ssize``\ overload is underconstrained","Prague","|Nothing To Do|","" "`3301 `__","``transform_view::iterator``\ has incorrect ``iterator_category``\ ","Prague","|Complete|","15.0","|ranges|" -"`3302 `__","Range adaptor objects ``keys``\ and ``values``\ are unspecified","Prague","","","|ranges|" +"`3302 `__","Range adaptor objects ``keys``\ and ``values``\ are unspecified","Prague","|Complete|","16.0","|ranges|" "`3303 `__","Bad ""``constexpr``\ "" marker for ``destroy/destroy_n``\ ","Prague","","" "`3304 `__","Allocate functions of ``std::polymorphic_allocator``\ should require ``[[nodiscard]]``\ ","Prague","|Complete|","16.0" "`3307 `__","``std::allocator().allocate(n)``\ ","Prague","","" @@ -244,7 +244,7 @@ "`3319 `__","Properly reference specification of IANA time zone database","Prague","","","|chrono|" "`3320 `__","``span::cbegin/cend``\ methods produce different results than ``std::[ranges::]cbegin/cend``\ ","Prague","|Complete|","" "`3321 `__","``uninitialized_construct_using_allocator``\ should use ``construct_at``\ ","Prague","|Complete|","16.0" -"`3323 `__","``*has-tuple-element*``\ helper concept needs ``convertible_to``\ ","Prague","","","|ranges|" +"`3323 `__","``*has-tuple-element*``\ helper concept needs ``convertible_to``\ ","Prague","|Nothing To Do|","","|ranges|" "`3324 `__","Special-case ``std::strong/weak/partial_order``\ for pointers","Prague","|Complete|","14.0","|spaceship|" "`3325 `__","Constrain return type of transformation function for ``transform_view``\ ","Prague","|Complete|","15.0","|ranges|" "`3326 `__","``enable_view``\ has false positives","Prague","|Complete|","15.0","|ranges|" @@ -273,7 +273,7 @@ "`3360 `__","``three_way_comparable_with``\ is inconsistent with similar concepts","Prague","|Nothing To Do|","","|spaceship|" "`3362 `__","Strike ``stop_source``\ 's ``operator!=``\ ","Prague","","" "`3363 `__","``drop_while_view``\ should opt-out of ``sized_range``\ ","Prague","|Nothing To Do|","","|ranges|" -"`3364 `__","Initialize data members of ranges and their iterators","Prague","","","|ranges|" +"`3364 `__","Initialize data members of ranges and their iterators","Prague","|Complete|","16.0","|ranges|" "`3367 `__","Integer-class conversions should not throw","Prague","|Nothing To Do|","" "`3369 `__","``span``\ 's deduction-guide for built-in arrays doesn't work","Prague","|Complete|","14.0" "`3371 `__","``visit_format_arg``\ and ``make_format_args``\ are not hidden friends","Prague","|Complete|","14.0","|format|" @@ -290,7 +290,7 @@ "`3384 `__","``transform_view::*sentinel*``\ has an incorrect ``operator-``\ ","Prague","|Complete|","15.0","|ranges|" "`3385 `__","``common_iterator``\ is not sufficiently constrained for non-copyable iterators","Prague","|Complete|","15.0","|ranges|" "`3387 `__","|sect|\ [range.reverse.view] ``reverse_view``\ unintentionally requires ``range``\ ","Prague","|Complete|","15.0","|ranges|" -"`3388 `__","``view``\ iterator types have ill-formed ``<=>``\ operators","Prague","","","|ranges|" +"`3388 `__","``view``\ iterator types have ill-formed ``<=>``\ operators","Prague","|Complete|","16.0","|ranges|" "`3389 `__","A move-only iterator still does not have a ``counted_iterator``\ ","Prague","|Complete|","15.0","|ranges|" "`3390 `__","``make_move_iterator()``\ cannot be used to construct a ``move_iterator``\ for a move-only iterator","Prague","|Complete|","14.0","|ranges|" "`3393 `__","Missing/incorrect feature test macro for coroutines","Prague","|Complete|","14.0" diff --git a/libcxx/docs/Status/Cxx20Papers.csv b/libcxx/docs/Status/Cxx20Papers.csv --- a/libcxx/docs/Status/Cxx20Papers.csv +++ b/libcxx/docs/Status/Cxx20Papers.csv @@ -131,7 +131,7 @@ "`P1651R0 `__","LWG","bind_front should not unwrap reference_wrapper","Cologne","|Complete|","13.0" "`P1652R1 `__","LWG","Printf corner cases in std::format","Cologne","|Complete|","14.0" "`P1661R1 `__","LWG","Remove dedicated precalculated hash lookup interface","Cologne","|Nothing To Do|","" -"`P1754R1 `__","LWG","Rename concepts to standard_case for C++20, while we still can","Cologne","|In Progress|","","|ranges|" +"`P1754R1 `__","LWG","Rename concepts to standard_case for C++20, while we still can","Cologne","|Complete|","15.0","|ranges|" "","","","","","" "`P0883R2 `__","LWG","Fixing Atomic Initialization","Belfast","|Complete| [#note-P0883.1]_ [#note-P0883.2]_","14.0" "`P1391R4 `__","LWG","Range constructor for std::string_view","Belfast","|Complete|","14.0","|ranges|" @@ -149,7 +149,7 @@ "`P1722R2 `__","LWG","Mandating the Standard Library: Clause 30 - Regular Expression library","Belfast","* *","" "`P1723R2 `__","LWG","Mandating the Standard Library: Clause 31 - Atomics library","Belfast","* *","" "`P1855R0 `__","LWG","Make ````\ freestanding","Belfast","* *","" -"`P1862R1 `__","LWG","Ranges adaptors for non-copyable iterators","Belfast","* *","","|ranges|" +"`P1862R1 `__","LWG","Ranges adaptors for non-copyable iterators","Belfast","|Complete|","16.0","|ranges|" "`P1865R1 `__","LWG","Add max() to latch and barrier","Belfast","|Complete|","11.0" "`P1869R1 `__","LWG","Rename 'condition_variable_any' interruptible wait methods","Belfast","* *","" "`P1870R1 `__","LWG","forwarding-range is too subtle","Belfast","|Complete|","15.0","|ranges|" @@ -174,7 +174,7 @@ "`P1937R2 `__","CWG","Fixing inconsistencies between constexpr and consteval functions","Prague","* *","" "`P1956R1 `__","LWG","On the names of low-level bit manipulation functions","Prague","|Complete|","12.0" "`P1957R2 `__","CWG","Converting from ``T*``\ to bool should be considered narrowing (re: US 212)","Prague","* *","" -"`P1963R0 `__","LWG","Fixing US 313","Prague","* *","","|ranges|" +"`P1963R0 `__","LWG","Fixing US 313","Prague","* *","","" "`P1964R2 `__","LWG","Wording for boolean-testable","Prague","|Complete|","13.0" "`P1970R2 `__","LWG","Consistency for size() functions: Add ranges::ssize","Prague","|Complete|","15.0","|ranges|" "`P1973R1 `__","LWG","Rename ""_default_init"" Functions, Rev1","Prague","* *","" @@ -193,12 +193,12 @@ "`P2116R0 `__","LWG","Remove tuple-like protocol support from fixed-extent span","Prague","|Complete|","11.0" "","","","","","" "`P2231R1 `__","LWG","Missing constexpr in std::optional and std::variant","June 2021","|Partial| [#note-P2231]_","13.0" -"`P2325R3 `__","LWG","Views should not be required to be default constructible","June 2021","|In progress|","","|ranges|" -"`P2210R2 `__","LWG",Superior String Splitting,"June 2021","|In progress|","","|ranges|" -"`P2216R3 `__","LWG",std::format improvements,"June 2021","|Complete|","15.0" -"`P2281R1 `__","LWG",Clarifying range adaptor objects,"June 2021","|Complete|","14.0","|ranges|" -"`P2328R1 `__","LWG",join_view should join all views of ranges,"June 2021","","","|ranges|" -"`P2367R0 `__","LWG",Remove misuses of list-initialization from Clause 24,"June 2021","","","|ranges|" +"`P2325R3 `__","LWG","Views should not be required to be default constructible","June 2021","|Complete|","16.0","|ranges|" +"`P2210R2 `__","LWG","Superior String Splitting","June 2021","|In progress|","","|ranges|" +"`P2216R3 `__","LWG","std::format improvements","June 2021","|Complete|","15.0" +"`P2281R1 `__","LWG","Clarifying range adaptor objects","June 2021","|Complete|","14.0","|ranges|" +"`P2328R1 `__","LWG","join_view should join all views of ranges","June 2021","|Complete|","15.0","|ranges|" +"`P2367R0 `__","LWG","Remove misuses of list-initialization from Clause 24","June 2021","|Complete|","15.0","|ranges|" "","","","","","" "`P2372R3 `__","LWG","Fixing locale handling in chrono formatters","October 2021","|In Progress|","" "`P2415R2 `__","LWG","What is a ``view``","October 2021","|Complete|","14.0","|ranges|" diff --git a/libcxx/docs/Status/RangesViews.csv b/libcxx/docs/Status/RangesViews.csv --- a/libcxx/docs/Status/RangesViews.csv +++ b/libcxx/docs/Status/RangesViews.csv @@ -17,7 +17,7 @@ C++20,`counted `_,Zoe Carver,`D106923 `_,✅ C++20,`common `_,Zoe Carver,`D105753 `_,✅ C++20,`reverse `_,Zoe Carver,`D107096 `_,✅ -C++20,`elements / keys / values `_,Hui Xie,`D136268 `_,Under review +C++20,`elements / keys / values `_,Hui Xie,`D136268 `_,✅ C++20,`istream `_,Hui Xie,`D133317 `_,✅ ,,,, ,,,, diff --git a/libcxx/include/__ranges/join_view.h b/libcxx/include/__ranges/join_view.h --- a/libcxx/include/__ranges/join_view.h +++ b/libcxx/include/__ranges/join_view.h @@ -228,7 +228,7 @@ range_difference_t<_Base>, range_difference_t>>; _LIBCPP_HIDE_FROM_ABI - __iterator() requires default_initializable<_Outer> = default; + __iterator() requires default_initializable<_Outer> && default_initializable<_Inner> = default; _LIBCPP_HIDE_FROM_ABI constexpr __iterator(_Parent& __parent, _Outer __outer) diff --git a/libcxx/include/version b/libcxx/include/version --- a/libcxx/include/version +++ b/libcxx/include/version @@ -136,7 +136,7 @@ __cpp_lib_parallel_algorithm 201603L __cpp_lib_polymorphic_allocator 201902L __cpp_lib_quoted_string_io 201304L -__cpp_lib_ranges 201811L +__cpp_lib_ranges 202106L __cpp_lib_ranges_chunk 202202L __cpp_lib_ranges_chunk_by 202202L @@ -355,7 +355,7 @@ # define __cpp_lib_list_remove_return_type 201806L # define __cpp_lib_math_constants 201907L # define __cpp_lib_polymorphic_allocator 201902L -# define __cpp_lib_ranges 201811L +# define __cpp_lib_ranges 202106L # define __cpp_lib_remove_cvref 201711L # if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) # define __cpp_lib_semaphore 201907L diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp @@ -19,7 +19,7 @@ __cpp_lib_clamp 201603L [C++17] __cpp_lib_constexpr_algorithms 201806L [C++20] __cpp_lib_parallel_algorithm 201603L [C++17] - __cpp_lib_ranges 201811L [C++20] + __cpp_lib_ranges 202106L [C++20] __cpp_lib_ranges_starts_ends_with 202106L [C++2b] __cpp_lib_robust_nonmodifying_seq_ops 201304L [C++14] __cpp_lib_sample 201603L [C++17] @@ -184,8 +184,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++20" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++20" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++20" # endif # ifdef __cpp_lib_ranges_starts_ends_with @@ -245,8 +245,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++2b" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++2b" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++2b" # endif # if !defined(_LIBCPP_VERSION) diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp @@ -24,7 +24,7 @@ __cpp_lib_invoke_r 202106L [C++2b] __cpp_lib_move_only_function 202110L [C++2b] __cpp_lib_not_fn 201603L [C++17] - __cpp_lib_ranges 201811L [C++20] + __cpp_lib_ranges 202106L [C++20] __cpp_lib_result_of_sfinae 201210L [C++14] __cpp_lib_transparent_operators 201210L [C++14] 201510L [C++17] @@ -257,8 +257,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++20" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++20" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++20" # endif # ifndef __cpp_lib_result_of_sfinae @@ -361,8 +361,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++2b" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++2b" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++2b" # endif # ifndef __cpp_lib_result_of_sfinae diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp @@ -22,7 +22,7 @@ __cpp_lib_make_reverse_iterator 201402L [C++14] __cpp_lib_nonmember_container_access 201411L [C++17] __cpp_lib_null_iterators 201304L [C++14] - __cpp_lib_ranges 201811L [C++20] + __cpp_lib_ranges 202106L [C++20] __cpp_lib_ssize 201902L [C++20] */ @@ -177,8 +177,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++20" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++20" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++20" # endif # ifndef __cpp_lib_ssize @@ -228,8 +228,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++2b" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++2b" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++2b" # endif # ifndef __cpp_lib_ssize diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp @@ -27,7 +27,7 @@ __cpp_lib_enable_shared_from_this 201603L [C++17] __cpp_lib_make_unique 201304L [C++14] __cpp_lib_out_ptr 202106L [C++2b] - __cpp_lib_ranges 201811L [C++20] + __cpp_lib_ranges 202106L [C++20] __cpp_lib_raw_memory_algorithms 201606L [C++17] __cpp_lib_shared_ptr_arrays 201611L [C++17] 201707L [C++20] @@ -350,8 +350,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++20" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++20" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++20" # endif # ifndef __cpp_lib_raw_memory_algorithms @@ -483,8 +483,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++2b" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++2b" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++2b" # endif # ifndef __cpp_lib_raw_memory_algorithms diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp @@ -16,7 +16,7 @@ // Test the feature test macros defined by /* Constant Value - __cpp_lib_ranges 201811L [C++20] + __cpp_lib_ranges 202106L [C++20] __cpp_lib_ranges_chunk 202202L [C++2b] __cpp_lib_ranges_chunk_by 202202L [C++2b] __cpp_lib_ranges_join_with 202202L [C++2b] @@ -110,8 +110,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++20" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++20" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++20" # endif # ifdef __cpp_lib_ranges_chunk @@ -139,8 +139,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++2b" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++2b" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++2b" # endif # if !defined(_LIBCPP_VERSION) diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp @@ -126,7 +126,7 @@ __cpp_lib_parallel_algorithm 201603L [C++17] __cpp_lib_polymorphic_allocator 201902L [C++20] __cpp_lib_quoted_string_io 201304L [C++14] - __cpp_lib_ranges 201811L [C++20] + __cpp_lib_ranges 202106L [C++20] __cpp_lib_ranges_chunk 202202L [C++2b] __cpp_lib_ranges_chunk_by 202202L [C++2b] __cpp_lib_ranges_iota 202202L [C++2b] @@ -3225,8 +3225,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++20" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++20" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++20" # endif # ifdef __cpp_lib_ranges_chunk @@ -4489,8 +4489,8 @@ # ifndef __cpp_lib_ranges # error "__cpp_lib_ranges should be defined in c++2b" # endif -# if __cpp_lib_ranges != 201811L -# error "__cpp_lib_ranges should have the value 201811L in c++2b" +# if __cpp_lib_ranges != 202106L +# error "__cpp_lib_ranges should have the value 202106L in c++2b" # endif # if !defined(_LIBCPP_VERSION) diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp --- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp @@ -8,7 +8,7 @@ // UNSUPPORTED: c++03, c++11, c++14, c++17 -// iterator() requires default_initializable = default; +// iterator() requires default_initializable && default_initializable = default; #include @@ -39,12 +39,20 @@ } constexpr bool test() { - test_non_default_constructible>(); + using ViewWithDefaultCtrIter = ChildViewBase; + using ViewNoDefaultCtrIter = ChildViewBase; + + test_non_default_constructible>(); + test_non_default_constructible>(); + test_non_default_constructible>(); + // NOTE: cpp20_input_iterator can't be used with join_view because it is not copyable. - test_default_constructible>(); - test_default_constructible>(); - test_default_constructible>(); - test_default_constructible>(); + + test_default_constructible>(); + test_default_constructible>(); + test_default_constructible>(); + test_default_constructible>(); + return true; } diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h b/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h --- a/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h +++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h @@ -23,25 +23,27 @@ {13, 14, 15, 16}, }; -struct ChildView : std::ranges::view_base { +template class Iter> +struct ChildViewBase : std::ranges::view_base { int* ptr_; - using iterator = cpp20_input_iterator; - using const_iterator = cpp20_input_iterator; + using iterator = Iter; + using const_iterator = Iter; using sentinel = sentinel_wrapper; using const_sentinel = sentinel_wrapper; - constexpr ChildView(int* ptr = globalBuffer[0]) : ptr_(ptr) {} - ChildView(const ChildView&) = delete; - ChildView(ChildView&&) = default; - ChildView& operator=(const ChildView&) = delete; - ChildView& operator=(ChildView&&) = default; + constexpr ChildViewBase(int* ptr = globalBuffer[0]) : ptr_(ptr) {} + ChildViewBase(const ChildViewBase&) = delete; + ChildViewBase(ChildViewBase&&) = default; + ChildViewBase& operator=(const ChildViewBase&) = delete; + ChildViewBase& operator=(ChildViewBase&&) = default; constexpr iterator begin() { return iterator(ptr_); } constexpr const_iterator begin() const { return const_iterator(ptr_); } constexpr sentinel end() { return sentinel(iterator(ptr_ + 4)); } constexpr const_sentinel end() const { return const_sentinel(const_iterator(ptr_ + 4)); } }; +using ChildView = ChildViewBase; inline ChildView globalChildren[4] = { ChildView(globalBuffer[0]),