From 6941e943ac685f415baf95ea767206538585c319 Mon Sep 17 00:00:00 2001
From: github-actions This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status. This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Tentatively Ready status. Section: 20.3.1.3.1 [unique.ptr.single.general] Status: New
- Submitter: Jonathan Wakely Opened: 2024-08-30 Last modified: 2024-08-31 Section: 20.3.1.3.1 [unique.ptr.single.general] Status: Tentatively Ready
+ Submitter: Jonathan Wakely Opened: 2024-08-30 Last modified: 2024-11-13 Priority: Not Prioritized
View all other issues in [unique.ptr.single.general]. View all issues with New status. View all issues with Tentatively Ready status. Discussion:
It seems that we currently allow nonsensical specializations of
-4144. Disallow
-unique_ptr<T&, D>
unique_ptr
@@ -101,6 +101,13 @@ 4144. Disallow
unique_ptr
disallowing these specializations for non-pointable types.
[2024-11-13; Reflector poll]
+ ++Set status to Tentatively Ready after eight votes in favour during reflector poll. +
+ +Proposed resolution:
diff --git a/issue4169.html b/issue4169.html index 53d7970456..46c8f38370 100644 --- a/issue4169.html +++ b/issue4169.html @@ -4,7 +4,7 @@
This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
+This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Tentatively Ready status.
std::atomic<T>
's default constructor should be constrainedSection: 32.5.8.2 [atomics.types.operations] Status: New - Submitter: Giuseppe D'Angelo Opened: 2024-10-15 Last modified: 2024-10-31
+Section: 32.5.8.2 [atomics.types.operations] Status: Tentatively Ready + Submitter: Giuseppe D'Angelo Opened: 2024-10-15 Last modified: 2024-11-13
Priority: Not Prioritized
View other active issues in [atomics.types.operations].
View all other issues in [atomics.types.operations].
-View all issues with New status.
+View all issues with Tentatively Ready status.
Discussion:
The current wording for std::atomic
's default constructor in
@@ -115,6 +115,13 @@
std::atomic<T>
and only if T
also is.
+[2024-11-13; Reflector poll]
+
+
+Set status to Tentatively Ready after seven votes in favour during reflector poll.
+
+
+
Proposed resolution:
diff --git a/issue4170.html b/issue4170.html
index ec5b6dfc4b..c0465e32e4 100644
--- a/issue4170.html
+++ b/issue4170.html
@@ -4,7 +4,7 @@
Issue 4170: contiguous_iterator should require to_address(I{})
-
+
@@ -61,14 +61,14 @@
-This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
+This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Tentatively Ready status.
4170. contiguous_iterator
should require to_address(I{})
-Section: 24.3.4.14 [iterator.concept.contiguous] Status: New
- Submitter: Casey Carter Opened: 2024-11-01 Last modified: 2024-11-01
+Section: 24.3.4.14 [iterator.concept.contiguous] Status: Tentatively Ready
+ Submitter: Casey Carter Opened: 2024-11-01 Last modified: 2024-11-13
Priority: Not Prioritized
View all other issues in [iterator.concept.contiguous].
-View all issues with New status.
+View all issues with Tentatively Ready status.
Discussion:
The design intent of the contiguous_iterator
concept is that iterators can be converted
@@ -88,6 +88,13 @@
4170. co
to empty pointer ranges as desired.
+[2024-11-13; Reflector poll]
+
+
+Set status to Tentatively Ready after eight votes in favour during reflector poll.
+
+
+
Proposed resolution:
diff --git a/lwg-active.html b/lwg-active.html
index fe42367a36..ef8462272b 100644
--- a/lwg-active.html
+++ b/lwg-active.html
@@ -67,7 +67,7 @@
Date:
- 2024-11-07
+ 2024-11-13
Project:
@@ -79,7 +79,7 @@
C++ Standard Library Active Issues List (Revision D125)
-Revised 2024-11-07 at 13:31:35 UTC
+
Revised 2024-11-13 at 20:39:34 UTC
Reference ISO/IEC IS 14882:2020(E)
Also see:
@@ -206,17 +206,17 @@ Revision History
Details:
- Added the following 11 Ready issues: 4014, 4024, 4027, 4044, 4064, 4072, 4085, 4112, 4134, 4154, 4164.
-- Added the following 14 Tentatively Ready issues: 4084, 4088, 4113, 4119, 4124, 4126, 4135, 4140, 4141, 4142, 4147, 4148, 4153, 4157.
+- Added the following 17 Tentatively Ready issues: 4084, 4088, 4113, 4119, 4124, 4126, 4135, 4140, 4141, 4142, 4144, 4147, 4148, 4153, 4157, 4169, 4170.
- Added the following 7 Tentatively NAD issues: 3958, 3980, 3981, 3982, 4003, 4006, 4095.
-- Added the following 133 New issues: 3945, 3952, 3954, 3955, 3956, 3959, 3960, 3961, 3962, 3963, 3945, 3952, 3954, 3955, 3956, 3959, 3960, 3961, 3962, 3963, 3964, 3966, 3967, 3968, 3969, 3972, 3976, 3977, 3979, 3983, 3985, 3986, 3989, 3991, 3992, 3993, 3994, 3995, 3997, 3998, 3999, 4000, 4002, 4005, 4007, 4008, 4009, 4010, 4017, 4018, 4020, 4021, 4022, 4026, 4028, 4029, 4032, 4033, 4034, 4039, 4040, 4041, 4046, 4047, 4048, 4049, 4050, 4051, 4052, 4055, 4057, 4058, 4059, 4062, 4063, 4065, 4066, 4067, 4068, 4073, 4077, 4078, 4080, 4081, 4089, 4091, 4092, 4093, 4094, 4099, 4100, 4101, 4102, 4103, 4104, 4107, 4109, 4110, 4111, 4114, 4115, 4116, 4117, 4118, 4120, 4121, 4122, 4123, 4125, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4136, 4137, 4138, 4139, 4143, 4144, 4145, 4146, 4149, 4150, 4151, 4152, 4155, 4156, 4158, 4159, 4160, 4161, 4162, 4163, 4165, 4166, 4167, 4168, 4169, 4170, 4171.
+forward_iterator (Status: New)">4120, 4121, 4122, 4123, 4125, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4136, 4137, 4138, 4139, 4143, 4145, 4146, 4149, 4150, 4151, 4152, 4155, 4156, 4158, 4159, 4160, 4161, 4162, 4163, 4165, 4166, 4167, 4168, 4171.
Added the following 3 Open issues: 3988, 4015, 4069.
Added the following 2 LEWG issues: 4042, 4097.
Added the following 2 SG1 issues: 4004, 4075.
@@ -68750,12 +68750,12 @@ 41434144(i). Disallow unique_ptr<T&, D>
-Section: 20.3.1.3.1 [unique.ptr.single.general] Status: New
- Submitter: Jonathan Wakely Opened: 2024-08-30 Last modified: 2024-08-31
+Section: 20.3.1.3.1 [unique.ptr.single.general] Status: Tentatively Ready
+ Submitter: Jonathan Wakely Opened: 2024-08-30 Last modified: 2024-11-13
Priority: Not Prioritized
View all other issues in [unique.ptr.single.general].
-View all issues with New status.
+View all issues with Tentatively Ready status.
Discussion:
It seems that we currently allow nonsensical specializations of unique_ptr
@@ -68788,6 +68788,13 @@
4144Proposed resolution:
@@ -70913,13 +70920,13 @@
41684169(i). std::atomic<T>
's default constructor should be constrained
-Section: 32.5.8.2 [atomics.types.operations] Status: New
- Submitter: Giuseppe D'Angelo Opened: 2024-10-15 Last modified: 2024-10-31
+Section: 32.5.8.2 [atomics.types.operations] Status: Tentatively Ready
+ Submitter: Giuseppe D'Angelo Opened: 2024-10-15 Last modified: 2024-11-13
Priority: Not Prioritized
View other active issues in [atomics.types.operations].
View all other issues in [atomics.types.operations].
-View all issues with New status.
+View all issues with Tentatively Ready status.
Discussion:
The current wording for std::atomic
's default constructor in
@@ -70965,6 +70972,13 @@
4169Proposed resolution:
@@ -71002,12 +71016,12 @@
41694170(i). contiguous_iterator
should require to_address(I{})
-Section: 24.3.4.14 [iterator.concept.contiguous] Status: New
- Submitter: Casey Carter Opened: 2024-11-01 Last modified: 2024-11-01
+Section: 24.3.4.14 [iterator.concept.contiguous] Status: Tentatively Ready
+ Submitter: Casey Carter Opened: 2024-11-01 Last modified: 2024-11-13
Priority: Not Prioritized
View all other issues in [iterator.concept.contiguous].
-View all issues with New status.
+View all issues with Tentatively Ready status.
Discussion:
The design intent of the contiguous_iterator
concept is that iterators can be converted
@@ -71027,6 +71041,13 @@
4170Proposed resolution:
diff --git a/lwg-closed.html b/lwg-closed.html
index 93dc3088ed..3632ef8ca5 100644
--- a/lwg-closed.html
+++ b/lwg-closed.html
@@ -67,7 +67,7 @@
Date:
- 2024-11-07
+ 2024-11-13
Project:
@@ -79,7 +79,7 @@
C++ Standard Library Closed Issues List (Revision D125)
-Revised 2024-11-07 at 13:31:35 UTC
+
Revised 2024-11-13 at 20:39:34 UTC
Reference ISO/IEC IS 14882:2020(E)
Also see:
@@ -110,17 +110,17 @@ Revision History
Details:
- Added the following 11 Ready issues: 4014, 4024, 4027, 4044, 4064, 4072, 4085, 4112, 4134, 4154, 4164.
-- Added the following 14 Tentatively Ready issues: 4084, 4088, 4113, 4119, 4124, 4126, 4135, 4140, 4141, 4142, 4147, 4148, 4153, 4157.
+- Added the following 17 Tentatively Ready issues: 4084, 4088, 4113, 4119, 4124, 4126, 4135, 4140, 4141, 4142, 4144, 4147, 4148, 4153, 4157, 4169, 4170.
- Added the following 7 Tentatively NAD issues: 3958, 3980, 3981, 3982, 4003, 4006, 4095.
-- Added the following 133 New issues: 3945, 3952, 3954, 3955, 3956, 3959, 3960, 3961, 3962, 3963, 3945, 3952, 3954, 3955, 3956, 3959, 3960, 3961, 3962, 3963, 3964, 3966, 3967, 3968, 3969, 3972, 3976, 3977, 3979, 3983, 3985, 3986, 3989, 3991, 3992, 3993, 3994, 3995, 3997, 3998, 3999, 4000, 4002, 4005, 4007, 4008, 4009, 4010, 4017, 4018, 4020, 4021, 4022, 4026, 4028, 4029, 4032, 4033, 4034, 4039, 4040, 4041, 4046, 4047, 4048, 4049, 4050, 4051, 4052, 4055, 4057, 4058, 4059, 4062, 4063, 4065, 4066, 4067, 4068, 4073, 4077, 4078, 4080, 4081, 4089, 4091, 4092, 4093, 4094, 4099, 4100, 4101, 4102, 4103, 4104, 4107, 4109, 4110, 4111, 4114, 4115, 4116, 4117, 4118, 4120, 4121, 4122, 4123, 4125, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4136, 4137, 4138, 4139, 4143, 4144, 4145, 4146, 4149, 4150, 4151, 4152, 4155, 4156, 4158, 4159, 4160, 4161, 4162, 4163, 4165, 4166, 4167, 4168, 4169, 4170, 4171.
+forward_iterator (Status: New)">4120
, 4121, 4122, 4123, 4125, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4136, 4137, 4138, 4139, 4143, 4145, 4146, 4149, 4150, 4151, 4152, 4155, 4156, 4158, 4159, 4160, 4161, 4162, 4163, 4165, 4166, 4167, 4168, 4171.
Added the following 3 Open issues: 3988, 4015, 4069.
Added the following 2 LEWG issues: 4042, 4097.
Added the following 2 SG1 issues: 4004, 4075.
diff --git a/lwg-defects.html b/lwg-defects.html
index c27497d6e6..9d5f34f22a 100644
--- a/lwg-defects.html
+++ b/lwg-defects.html
@@ -67,7 +67,7 @@
Date:
- 2024-11-07
+ 2024-11-13
Project:
@@ -79,7 +79,7 @@
C++ Standard Library Defect Reports and Accepted Issues (Revision D125)
-Revised 2024-11-07 at 13:31:35 UTC
+
Revised 2024-11-13 at 20:39:34 UTC
Reference ISO/IEC IS 14882:2020(E)
Also see:
@@ -111,17 +111,17 @@ Revision History
Details:
- Added the following 11 Ready issues: 4014, 4024, 4027, 4044, 4064, 4072, 4085, 4112, 4134, 4154, 4164.
-- Added the following 14 Tentatively Ready issues: 4084, 4088, 4113, 4119, 4124, 4126, 4135, 4140, 4141, 4142, 4147, 4148, 4153, 4157.
+- Added the following 17 Tentatively Ready issues: 4084, 4088, 4113, 4119, 4124, 4126, 4135, 4140, 4141, 4142, 4144, 4147, 4148, 4153, 4157, 4169, 4170.
- Added the following 7 Tentatively NAD issues: 3958, 3980, 3981, 3982, 4003, 4006, 4095.
-- Added the following 133 New issues: 3945, 3952, 3954, 3955, 3956, 3959, 3960, 3961, 3962, 3963, 3945, 3952, 3954, 3955, 3956, 3959, 3960, 3961, 3962, 3963, 3964, 3966, 3967, 3968, 3969, 3972, 3976, 3977, 3979, 3983, 3985, 3986, 3989, 3991, 3992, 3993, 3994, 3995, 3997, 3998, 3999, 4000, 4002, 4005, 4007, 4008, 4009, 4010, 4017, 4018, 4020, 4021, 4022, 4026, 4028, 4029, 4032, 4033, 4034, 4039, 4040, 4041, 4046, 4047, 4048, 4049, 4050, 4051, 4052, 4055, 4057, 4058, 4059, 4062, 4063, 4065, 4066, 4067, 4068, 4073, 4077, 4078, 4080, 4081, 4089, 4091, 4092, 4093, 4094, 4099, 4100, 4101, 4102, 4103, 4104, 4107, 4109, 4110, 4111, 4114, 4115, 4116, 4117, 4118, 4120, 4121, 4122, 4123, 4125, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4136, 4137, 4138, 4139, 4143, 4144, 4145, 4146, 4149, 4150, 4151, 4152, 4155, 4156, 4158, 4159, 4160, 4161, 4162, 4163, 4165, 4166, 4167, 4168, 4169, 4170, 4171.
+forward_iterator (Status: New)">4120
, 4121, 4122, 4123, 4125, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4136, 4137, 4138, 4139, 4143, 4145, 4146, 4149, 4150, 4151, 4152, 4155, 4156, 4158, 4159, 4160, 4161, 4162, 4163, 4165, 4166, 4167, 4168, 4171.
Added the following 3 Open issues: 3988, 4015, 4069.
Added the following 2 LEWG issues: 4042, 4097.
Added the following 2 SG1 issues: 4004, 4075.
diff --git a/lwg-immediate.html b/lwg-immediate.html
index 9a34ebead2..4b02a894a3 100644
--- a/lwg-immediate.html
+++ b/lwg-immediate.html
@@ -62,7 +62,7 @@ C++ Standard Library Issues Resolved Directly In [INSERT CURRENT MEETING HER
Date:
-Revised 2024-11-07 at 13:31:35 UTC
+ Revised 2024-11-13 at 20:39:34 UTC
diff --git a/lwg-index-open.html b/lwg-index-open.html
index 64b4142a61..a3f1b924cf 100644
--- a/lwg-index-open.html
+++ b/lwg-index-open.html
@@ -66,7 +66,7 @@ Index by Section
This document is the Index by Section for the Library Active Issues List.
Index by Section (non-Ready active issues only)
-Revised 2024-11-07 at 13:31:35 UTC
+
Revised 2024-11-13 at 20:39:34 UTC
Section 3 (2 issues)
@@ -1104,8 +1104,8 @@ Section 20 (25 issues)
-4144(i)
-New
+4144(i)
+Tentatively Ready
20.3.1.3.1 [unique.ptr.single.general]
Disallow unique_ptr<T&, D>
Yes
@@ -2522,8 +2522,8 @@ Section 24 (40 issues)
-4170(i)
-New
+4170(i)
+Tentatively Ready
24.3.4.14 [iterator.concept.contiguous]
contiguous_iterator
should require to_address(I{})
Yes
@@ -5261,8 +5261,8 @@ Section 32 (41 issues)
-4169(i)
-New
+4169(i)
+Tentatively Ready
32.5.8.2 [atomics.types.operations]
std::atomic<T>
's default constructor should be constrained
Yes
diff --git a/lwg-index.html b/lwg-index.html
index ac1805fa06..223b435c94 100644
--- a/lwg-index.html
+++ b/lwg-index.html
@@ -66,7 +66,7 @@ Index by Section
This document is the Index by Section for the Library Active Issues List, Library Defect Reports and Accepted Issues, and Library Closed Issues List.
Index by Section
(view only non-Ready open issues)
-Revised 2024-11-07 at 13:31:35 UTC
+
Revised 2024-11-13 at 20:39:34 UTC
Section 2 (2 issues)
@@ -4954,8 +4954,8 @@ Section 20 (207 issues)
-4144(i)
-New
+4144(i)
+Tentatively Ready
20.3.1.3.1 [unique.ptr.single.general]
Disallow unique_ptr<T&, D>
Yes
@@ -14074,8 +14074,8 @@ Section 24 (205 issues)
-4170(i)
-New
+4170(i)
+Tentatively Ready
24.3.4.14 [iterator.concept.contiguous]
contiguous_iterator
should require to_address(I{})
Yes
@@ -29412,8 +29412,8 @@ Section 32 (275 issues)
-4169(i)
-New
+4169(i)
+Tentatively Ready
32.5.8.2 [atomics.types.operations]
std::atomic<T>
's default constructor should be constrained
Yes
diff --git a/lwg-ready.html b/lwg-ready.html
index 096fe1c22e..71e32879fd 100644
--- a/lwg-ready.html
+++ b/lwg-ready.html
@@ -62,7 +62,7 @@ C++ Standard Library Issues to be moved in [INSERT CURRENT MEETING HERE]
Date:
-Revised 2024-11-07 at 13:31:35 UTC
+ Revised 2024-11-13 at 20:39:34 UTC
@@ -4058,6 +4058,115 @@ 41424144(i). Disallow unique_ptr<T&, D>
+Section: 20.3.1.3.1 [unique.ptr.single.general] Status: Tentatively Ready
+ Submitter: Jonathan Wakely Opened: 2024-08-30 Last modified: 2024-11-13
+Priority: Not Prioritized
+
+View all other issues in [unique.ptr.single.general].
+View all issues with Tentatively Ready status.
+Discussion:
+
+It seems that we currently allow nonsensical specializations of unique_ptr
+such as unique_ptr<int&, D>
+and unique_ptr<void()const, D>
+(a custom deleter that defines D::pointer
is needed, because otherwise
+the pointer
type would default to invalid types like
+int&*
or void(*)()const
).
+There seems to be no reason to support these "unique pointer to reference"
+and "unique pointer to abominable function type" specializations,
+or any specialization for a type that you couldn't form a raw pointer to.
+
+
+
+Prior to C++17, the major library implementations rejected such specializations
+as a side effect of the constraints for the
+unique_ptr(auto_ptr<U>&&)
constructor
+being defined in terms of is_convertible<U*, T*>
.
+This meant that overload resolution for any constructor of unique_ptr
+would attempt to form the type T*
and fail if that was invalid.
+With the removal of auto_ptr
in C++17, that constructor was removed
+and now unique_ptr<int&, D>
can be instantiated
+(assuming any zombie definition of auto_ptr
is not enabled by the library).
+This wasn't intentional, but just an accident caused by not explicitly
+forbidding such types.
+
+
+
+Discussion on the LWG reflector led to near-unanimous support for explicitly
+disallowing these specializations for non-pointable types.
+
+
+[2024-11-13; Reflector poll]
+
+
+Set status to Tentatively Ready after eight votes in favour during reflector poll.
+
+
+
+
+Proposed resolution:
+
+This wording is relative to N4988.
+
+
+
+Modify 20.3.1.3.1 [unique.ptr.single.general] as indicated:
+
+-?-
+A program that instantiates the definition of
+unique_ptr<T, D>
+is ill-formed if T*
is an invalid type.
+
+[Note:
+This prevents the intantiation of specializations such as
+unique_ptr<T&, D>
+and unique_ptr<int() const, D>
.
+— end note]
+
+
+-1-
+The default type for the template parameter D
is default_delete
.
+A client-supplied template argument D
shall be a function object type
+(22.10 [function.objects]), lvalue reference to function,
+or lvalue reference to function object type for which,
+given a value d
of type D
and a value ptr
of type
+unique_ptr<T, D>::pointer
,
+the expression d(ptr)
is valid and has the effect of disposing of the pointer
+as appropriate for that deleter.
+
+-2-
+If the deleter’s type D
is not a reference type,
+D
shall meet the Cpp17Destructible requirements (Table 35).
+
+-3-
+If the qualified-id remove_reference_t<D>::pointer
+is valid and denotes a type (13.10.3 [temp.deduct]),
+then unique_ptr<T, D>::pointer
+shall be a synonym for remove_reference_t<D>::pointer
.
+Otherwise unique_ptr<T, D>::pointer
shall be a synonym for
+element_type*
.
+The type unique_ptr<T, D>::pointer
shall meet the
+Cpp17NullablePointer requirements (Table 36).
+
+-4-
+[Example 1:
+ Given an allocator type X
(16.4.4.6.1 [allocator.requirements.general])
+and letting A
be a synonym for allocator_traits<X>
,
+the types A::pointer
, A::const_pointer
, A::void_pointer
,
+and A::const_void_pointer
may be used as
+unique_ptr<T, D>::pointer
.
+— end example]
+
+
+
+
+
+
+
+
+
4147(i). Precondition on inplace_vector::emplace
Section: 23.2.4 [sequence.reqmts] Status: Tentatively Ready
@@ -4578,5 +4687,186 @@
41644169(i). std::atomic<T>
's default constructor should be constrained
+Section: 32.5.8.2 [atomics.types.operations] Status: Tentatively Ready
+ Submitter: Giuseppe D'Angelo Opened: 2024-10-15 Last modified: 2024-11-13
+Priority: Not Prioritized
+
+View other active issues in [atomics.types.operations].
+View all other issues in [atomics.types.operations].
+View all issues with Tentatively Ready status.
+Discussion:
+
+The current wording for std::atomic
's default constructor in
+32.5.8.2 [atomics.types.operations] specifies:
+
+
+
+constexpr atomic() noexcept(is_nothrow_default_constructible_v<T>);
+
+
+
+Mandates: is_default_constructible_v<T>
is true
.
+
+
+
+
+This wording has been added by P0883R2 for C++20, which changed
+std::atomic
's default constructor to always value-initialize. Before,
+the behavior of this constructor was not well specified (this was LWG
+issue 2334(i)).
+
+The usage of a Mandates element in the specification has as a
+consequence that std::atomic<T>
is always default constructible, even
+when T
is not. For instance:
+
+
+
+// not default constructible:
+struct NDC { NDC(int) {} };
+
+static_assert(std::is_default_constructible<std::atomic<NDC>>); // OK
+
+
+
+The above check is OK as per language rules, but this is user-hostile:
+actually using std::atomic<NDC>
's default constructor results in an
+error, despite the detection saying otherwise.
+
+Given that std::atomic<T>
already requires T
to be complete anyhow
+(32.5.8.1 [atomics.types.generic.general] checks for various type properties
+which require completeness) it would be more appropriate to use a
+constraint instead, so that std::atomic<T>
is default constructible if
+and only if T
also is.
+
+
+[2024-11-13; Reflector poll]
+
+
+Set status to Tentatively Ready after seven votes in favour during reflector poll.
+
+
+
+
+Proposed resolution:
+
+This wording is relative to N4993.
+
+
+
+Modify 32.5.8.2 [atomics.types.operations] as indicated:
+
+
+
+[Drafting note: There is implementation divergence at the moment; libstdc++ already
+implements the proposed resolution and has done so for a while.]
+
+
+
+
+
+constexpr atomic() noexcept(is_nothrow_default_constructible_v<T>);
+
+
+
+-1- ConstraintsMandates: is_default_constructible_v<T>
is true
.
+
+-2- Effects: […]
+
+
+
+
+
+
+
+
+
+
+
+4170(i). contiguous_iterator
should require to_address(I{})
+Section: 24.3.4.14 [iterator.concept.contiguous] Status: Tentatively Ready
+ Submitter: Casey Carter Opened: 2024-11-01 Last modified: 2024-11-13
+Priority: Not Prioritized
+
+View all other issues in [iterator.concept.contiguous].
+View all issues with Tentatively Ready status.
+Discussion:
+
+The design intent of the contiguous_iterator
concept is that iterators can be converted
+to pointers denoting the same sequence of elements. This enables a common range [i, j)
+or counted range i + [0, n)
to be processed with extremely efficient low-level C
+or assembly code that operates on [to_address(i), to_address(j))
(respectively
+to_address(i) + [0, n)
).
+
+A value-initialized iterator I{}
can be used to denote the empty ranges [I{}, I{})
+and I{} + [0, 0)
. While the existing semantic requirements of contiguous_iterator
enable us
+to convert both dereferenceable and past-the-end iterators with to_address
, converting
+ranges involving value-initialized iterators to pointer ranges additionally needs
+to_address(I{})
to be well-defined. Note that to_address
is already implicitly
+equality-preserving for contiguous_iterator
arguments. Given this additional requirement
+to_address(I{}) == to_address(I{})
and to_address(I{}) == to_address(I{)) + 0
+both hold, so the two types of empty ranges involving value-initialized iterators convert
+to empty pointer ranges as desired.
+
+
+[2024-11-13; Reflector poll]
+
+
+Set status to Tentatively Ready after eight votes in favour during reflector poll.
+
+
+
+
+Proposed resolution:
+
+This wording is relative to N4993.
+
+
+
+Modify 24.3.4.14 [iterator.concept.contiguous] as indicated:
+
+
+
+-1- The contiguous_iterator
concept provides a guarantee that the denoted elements are stored contiguously
+in memory.
+
+
+
+template<class I>
+ concept contiguous_iterator =
+ random_access_iterator<I> &&
+ derived_from<ITER_CONCEPT(I), contiguous_iterator_tag> &&
+ is_lvalue_reference_v<iter_reference_t<I>> &&
+ same_as<iter_value_t<I>, remove_cvref_t<iter_reference_t<I>>> &&
+ requires(const I& i) {
+ { to_address(i) } -> same_as<add_pointer_t<iter_reference_t<I>>>;
+ };
+
+
+
+-2- Let a
and b
be dereferenceable iterators and c
be a non-dereferenceable iterator of type
+I
such that b
is reachable from a
and c
is reachable from b
, and let D
be
+iter_difference_t<I>
. The type I
models contiguous_iterator
only if
+
+
+
+(2.1) — to_address(a) == addressof(*a)
,
+(2.2) — to_address(b) == to_address(a) + D(b - a)
,
+(2.3) — to_address(c) == to_address(a) + D(c - a)
,
+(2.?) — to_address(I{})
is well-defined,
+(2.4) — ranges::iter_move(a)
has the same type, value category, and effects as
+std::move(*a)
, and
+(2.5) — if ranges::iter_swap(a, b)
is well-formed, it has effects equivalent to
+ranges::swap(*a, *b)
.
+
+
+
+
+
+
+
+
+