Revised 2019-10-07 at 02:37:36 UTC
Section: 17.13 [support.runtime] Status: Tentatively Resolved Submitter: Thomas Plum Opened: 2012-04-30 Last modified: 2019-03-26
Priority: 4
View all other issues in [support.runtime].
View all issues with Tentatively Resolved status.
Discussion:
Since C99, the C standard describes a macro named __bool_true_false_are_defined.
In the process of harmonizing C++11 with C99, this name became part of the C++ standard. I propose that all mention of this name should be removed from the C and C++ standards. Here's the problem: The name was originally proposed as a transition tool, so that the headers for a project could contain lines like the following.#if !defined(__bool_true_false_are_defined) #define bool int /* or whatever */ #define true 1 #define false 0 #endif
Then when the project was compiled by a "new" compiler that implemented bool as defined by the evolving C++98 or C99 standards, those lines would be skipped; but when compiled by an "old" compiler that didn't yet provide bool, true, and false, then the #define's would provide a simulation that worked for most purposes.
It turns out that there is an unfortunate ambiguity in the name. One interpretation is as shown above, but a different reading says "bool, true, and false are #define'd", i.e. that the meaning of the macro is to assert that these names are macros (not built-in) ... which is true in C, but not in C++. In C++11, the name appears in parentheses followed by a stray period, so some editorial change is needed in any event: 17.13 [support.runtime] para 1:Headers <csetjmp> (nonlocal jumps), <csignal> (signal handling), <cstdalign> (alignment), <cstdarg> (variable arguments), <cstdbool> (__bool_true_false_are_defined). <cstdlib> (runtime environment getenv(), system()), and <ctime> (system clock clock(), time()) provide further compatibility with C code.
However, para 2 says
"The contents of these headers are the same as the Standard C library headers <setjmp.h>, <signal.h>, <stdalign.h>, <stdarg.h>, <stdbool.h>, <stdlib.h>, and <time.h>, respectively, with the following changes:",
and para 8 says
"The header <cstdbool> and the header <stdbool.h> shall not define macros named bool, true, or false."
Thus para 8 doesn't exempt the C++ implementation from the arguably clear requirement of the C standard, to provide a macro named __bool_true_false_are_defined defined to be 1.
Real implementations of the C++ library differ, so the user cannot count upon any consistency; furthermore, the usefulness of the transition tool has faded long ago. That's why my suggestion is that both C and C++ standards should eliminate any mention of __bool_true_false_are_defined. In that case, the name belongs to implementers to provide, or not, as they choose.[2013-03-15 Issues Teleconference]
Moved to Open.
While not strictly necessary, the clean-up look good.
We would like to hear from our C liaison before moving on this issue though.
[2015-05 Lenexa]
LWG agrees. Jonathan provides wording.
[2017-03-04, Kona]
The reference to <cstdbool> in p2 needs to be struck as well. Continue the discussion on the reflector once the DIS is available.
Previous resolution [SUPERSEDED]:
This wording is relative to N4296.
Edit the footnote on 16.5.1.2 [headers] p7:
176) In particular, including any of the standard headers <stdbool.h>, <cstdbool>, <iso646.h> or <ciso646> has no effect.
Edit 17.13 [support.runtime] p1 as indicated (and remove the index entry for __bool_true_false_are_defined):
-1- Headers <csetjmp> (nonlocal jumps), <csignal> (signal handling), <cstdalign> (alignment), <cstdarg> (variable arguments), <cstdbool>,
(__bool_true_false_are_defined).<cstdlib> (runtime environment getenv(), system()), and <ctime> (system clock clock(), time()) provide further compatibility with C code.Remove Table 38 — Header <cstdbool> synopsis [tab:support.hdr.cstdbool] from 17.13 [support.runtime]
Table 38 — Header <cstdbool> synopsis Type Name(s) Macro: __bool_true_false_are_defined
[2019-03-18; Daniel comments and eliminates previously proposed wording]
With the approval of P0619R4 in Rapperswil, the offending wording has now been eliminated from the working draft. I suggest to close this issue as: Resolved by P0619R4.
Rationale:
Resolved by P0619R4.Proposed resolution:
Section: 16.4.1.4 [structure.specifications] Status: Tentatively Resolved Submitter: Jeffrey Yasskin Opened: 2013-09-03 Last modified: 2019-03-26
Priority: 3
View other active issues in [structure.specifications].
View all other issues in [structure.specifications].
View all issues with Tentatively Resolved status.
Discussion:
The C++14 CD has 25 sections including the phrase "X shall not participate in overload resolution ...". Most of these uses are double negatives, which are hard to interpret. "shall not ... unless" tends to be the easiest to read, since the condition is true when the function is available, but we also have a lot of "if X is not Y, then Z shall not participate", which actually means "You can call Z if X is Y." The current wording is also clumsy and long-winded. We should find a better and more concise phrasing.
As an initial proposal, I'd suggest using "X is enabled if and only if Y" in prose and adding an "Enabled If: ..." element to 16.4.1.4 [structure.specifications]. Daniel: I suggest to name this new specification element for 16.4.1.4 [structure.specifications] as "Template Constraints:" instead, because the mentioned wording form was intentionally provided starting with LWG 1237 to give implementations more freedom to realize the concrete constraints. Instead of the original std::enable_if-based specifications we can use better forms of "SFINAE" constraints today and it eases the path to possible language-based constraints in the future.[2019-03-21; Daniel comments ]
Apparently the adoption of P0788R3 at the Rapperswil 2018 meeting has resolved this issue by introduction of the new Constraints: element.
Rationale:
Resolved by P0788R3.Proposed resolution:
Section: 29.5.4.2 [fpos.operations] Status: Tentatively Resolved Submitter: Great Britain Opened: 2016-11-09 Last modified: 2019-03-26
Priority: 4
View other active issues in [fpos.operations].
View all other issues in [fpos.operations].
View all issues with Tentatively Resolved status.
Discussion:
Addresses GB 60
The requirements on the stateT type used to instantiate class template fpos are not clear, and the following Table 108 — "Position type requirements" is a bit of a mess. This is old wording, and should be cleaned up with better terminology from the Clause 17 Requirements. For example, stateT might be require CopyConstructible?, CopyAssignable?, and Destructible. Several entries in the final column of the table appear to be post-conditions, but without the post markup to clarify they are not assertions or preconditions. They frequently refer to identifiers that do not apply to all entries in their corresponding Expression column, leaving some expressions without a clearly defined semantic. If stateT is a trivial type, is fpos also a trivial type, or is a default constructor not required/supported?
Proposed change:
Clarify the requirements and the table.[Issues Telecon 16-Dec-2016]
Priority 4; no consensus for any concrete change
[2019-03-17; Daniel comments]
With the acceptance of P0759R1 at the Rapperswil 2018 meeting this issue should be closed as Resolved (Please note that this paper resolves a historic NB comment that was originally written against C++17 but was at that time responded: "invite a paper if anybody wants to change it - no concensus for change").
Rationale:
Resolved by P0759R1.Proposed resolution:
Section: 29.5.4.2 [fpos.operations] Status: Tentatively Resolved Submitter: Jens Maurer Opened: 2016-11-24 Last modified: 2019-03-26
Priority: 3
View other active issues in [fpos.operations].
View all other issues in [fpos.operations].
View all issues with Tentatively Resolved status.
Discussion:
This is from editorial issue #1031.
The first row in Table 112 "Position type requirements" talks about the expression P(i) and then has an assertion p == P(i). However, there are no constraints on p other than being of type P, so (on the face of it) this seems to require that operator== on P always returns true, which is non-sensical.[2017-01-27 Telecon]
Priority 3
[2019-03-17; Daniel comments]
With the acceptance of P0759R1 at the Rapperswil 2018 meeting this issue should be closed as Resolved.
Rationale:
Resolved by P0759R1.Proposed resolution:
Section: 16.4.2.1 [expos.only.func] Status: Tentatively Resolved Submitter: Marshall Clow Opened: 2017-07-11 Last modified: 2019-06-17
Priority: 3
View all issues with Tentatively Resolved status.
Discussion:
[thread.decaycopy] says:
In several places in this Clause the operation DECAY_COPY(x) is used. All such uses mean call the function decay_copy(x) and use the result, where decay_copy is defined as follows:
but decay_copy is not defined in any synopsis.
The Ranges TS has a similar use of DECAY_COPY, except that theirs is also constexpr and noexcept. We should mark the function decay_copy as "exposition only" and constexpr and noexcept.[2017-07-16, Daniel comments]
Currently there exists no proper way to mark decay_copy as conditionally noexcept as explained in N3255 section "Adding to the Standard". This is also slighly related to the request to add an is_nothrow_convertible trait, as requested by LWG 2040.
[ 2017-11-01 P3 as result of c++std-lib online vote. ]
[2019-03-22; Daniel comments]
Starting with N4800 have now a constexpr and conditionally noexcept decay-copy in the working draft (16.4.2.1 [expos.only.func]). The pre-condition for that specification helper became possible by adoption of P0758R1, which introduced the missing is_nothrow_convertible trait.
Rationale:
Resolved by editorial creation of decay-copy after acceptance of P0758R1.Proposed resolution:
Section: 25.5.10 [mismatch] Status: Tentatively Resolved Submitter: Geoffrey Romer Opened: 2018-12-20 Last modified: 2019-03-26
Priority: 0
View all other issues in [mismatch].
View all issues with Tentatively Resolved status.
Discussion:
Consider the following code:
std::vector<int> v1 = {1, 2, 3, 4}; std::vector<int> v2 = {1, 2, 3, 5}; auto result = std::mismatch(v1.begin(), v1.begin() + 2, v2.begin(), v2.begin() + 2);
The current wording of [mismatch] seems to require result to be {v1.begin() + 3, v2.begin() + 3}, because 3 is the smallest integer n such that *(v1.begin() + n) != *(v2.begin + n). In other words, if there's a mismatch that's reachable from first1 and first2, then std::mismatch must find and return it, even if it's beyond the end iterators passed by the user.
This is doubly unimplementable: the library has no way of knowing that it's safe to keep going past the end of the user-supplied range, and even if it could, doing so would violate the complexity requirements. More importantly, it would violate the fundamental convention that STL algorithms operate on user-supplied ranges, not on the underlying containers.[2019-01-26 Priority to 0 and Status to Tentatively Ready after discussions on the reflector]
During that reflector discussion several contributers argued in favour for changing the current wording in 25.5.10 [mismatch] p3 from "smallest integer" to "smallest nonnegative integer". This minor wording delta has also been added to the original proposed wording.
Previous resolution [SUPERSEDED]:
This wording is relative to N4791.
Change 25.5.10 [mismatch] as indicated:
template<class InputIterator1, class InputIterator2> constexpr pair<InputIterator1, InputIterator2> mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2); […] namespace ranges { template<InputIterator I1, Sentinel<I1> S1, InputIterator I2, Sentinel<I2> S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation<projected<I1, Proj1>, projected<I2, Proj2>> Pred = ranges::equal_to<>> constexpr mismatch_result<I1, I2> mismatch(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template<InputRange R1, InputRange R2, class Proj1 = identity, class Proj2 = identity, IndirectRelation<projected<iterator_t<R1>, Proj1>, projected<iterator_t<R2>, Proj2>> Pred = ranges::equal_to<>> constexpr mismatch_result<safe_iterator_t<R1>, safe_iterator_t<R2>> mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); }-1- Let last2 be first2 + (last1 - first1) for the overloads with no parameter last2 or r2.
-2- Let E be:-?- Let N be min(last1 - first1, last2 - first2). -3- Returns: { first1 + n, first2 + n }, where n is the smallest nonnegative integer such that E holds, or
(2.1) — !(*(first1 + n) == *(first2 + n)) for the overloads with no parameter pred,
(2.2) — pred(*(first1 + n), *(first2 + n)) == false for the overloads with a parameter pred and no parameter proj1,
(2.3) — !invoke(pred, invoke(proj1, *(first1 + n)), invoke(proj2, *(first2 + n))) for the overloads with both parameters pred and proj1.
min(last1 - first1, last2 - first2)N if no such integer less than N exists. -4- Complexity: At mostmin(last1 - first1, last2 - first2)N applications of the corresponding predicate and any projections.
[2019-03-15; Daniel comments]
The editorial issue #2611 had been resolved via this pull request #2613. The editorial changes should make the suggested wording changes obsolete and I recommend to close this issue as Resolved.
Rationale:
Resolved by editorial pull request #2613.Proposed resolution:
Section: 23.7 [iterator.range] Status: Tentatively NAD Submitter: Nevin Liber Opened: 2019-05-23 Last modified: 2019-06-16
Priority: Not Prioritized
View other active issues in [iterator.range].
View all other issues in [iterator.range].
Discussion:
The N in ssize(const T (&)[N]) is specified to be of type ptrdiff_t. It should be size_t to be consistent with the rest of the standard library, such as the array overloads for all other range access functions, the swap overload for arrays, and other function template overloads for arrays. (Note: the return type of this function should still be ptrdiff_t.)
[2019-06-12 Tentatively NAD after reflector discussion]
Proposed resolution:
This wording is relative to N4810.
Modify 23.7 [iterator.range] as indicated:
template<class T,ptrdiffsize_t N> constexpr ptrdiff_t ssize(const T (&array)[N]) noexcept;-19- Returns: static_cast<ptrdiff_t>(N).
Section: 27.13 [time.parse] Status: Tentatively Ready Submitter: Tomasz Kamiński Opened: 2019-06-13 Last modified: 2019-09-25
Priority: 0
View other active issues in [time.parse].
View all other issues in [time.parse].
View all issues with Tentatively Ready status.
Discussion:
Currently, the '%d
' parse flags accepts the 'E
' modifier to parse the
locale's alternative representation, see Table 88 —
"Meaning of parse
flags":
The modified command
%Ed
interprets the locale's alternative representation of the day of the month.
This is inconsistent with the
POSIX
strftime
specification and the format functions, that uses 'O
'
to output alternate locale representation. Per Table 87 —
"Meaning of format
conversion specifiers":
The modified command
%Od
produces the locale's alternative representation.
[2019-06-24; Howard comments]
This was simply a type-o in my documentation that infected the proposal and subsequently the C++ working draft.
None of std::time_put, C's strftime, or POSIX's strftime support %Ed but all support %Od. Furthermore the existing example implementation supports %Od but not %Ed. And all the existing example implementation does is forward to std::time_put.[2019-07 Issue Prioritization]
Status to Tentatively Ready after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4810.
Modify 27.13 [time.parse], Table 88 — "Meaning of parse
flags",
as indicated:
Table 88 — Meaning of parse
flagsFlag Parsed value […] %d The day of the month as a decimal number. The modified command %Nd specifies the maximum number of characters to read. If N is not specified, the default is 2. Leading zeroes are permitted but not required. The modified command % EOd interprets the locale's alternative representation of the day of the month.[…]
Section: 27.8.13.3 [time.cal.ym.nonmembers] Status: Tentatively Ready Submitter: Tomasz Kamiński Opened: 2019-06-16 Last modified: 2019-09-25
Priority: 0
View all issues with Tentatively Ready status.
Discussion:
The current specification of the addition of year_month
and
months
does not define a unique result value.
year(2019)/month(1)
and year(2018)/month(13)
are valid results of year(2018)/month(12) + months(1)
addition,
according to the spec in 27.8.13.3 [time.cal.ym.nonmembers].
[2019-06-24; LWG discussion]
During discussions on the LWG reflector there was a preference to add "is true" at the end of the modified Returns: element. This additional edit has been applied to Tomasz' original wording below.
[2019-07 Issue Prioritization]
Status to Tentatively Ready after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4810.
Modify 27.8.13.3 [time.cal.ym.nonmembers] as indicated:
constexpr year_month operator+(const year_month& ym, const months& dm) noexcept;-3- Returns: A year_month value z such that z.ok() && z - ym == dm is true.
Complexity: 𝒪(1) with respect to the value of dm.
Section: 25.9.8 [inclusive.scan], 25.9.10 [transform.inclusive.scan] Status: Tentatively Ready Submitter: Jonathan Wakely Opened: 2019-06-18 Last modified: 2019-09-25
Priority: 0
View all issues with Tentatively Ready status.
Discussion:
after applying P0574R1 to the working draft, 25.9.10 [transform.inclusive.scan] bullet 1.1 says "If init is provided, […]; otherwise, ForwardIterator1's value type shall be […]." 25.9.10 [transform.inclusive.scan] bullet 1.2 says "If init is provided, […]; otherwise, […] shall be convertible to ForwardIterator1's value type."
For the first overload init is not provided, but there is no ForwardIterator1, so these requirements cannot be met. The requirements for the first overload need to be stated in terms of InputIterator's value type, not ForwardIterator1's value type. The same problem exists in 25.9.8 [inclusive.scan]. 25.9.11 [adjacent.difference] solves this problem by saying "Let T be the value type of decltype(first)".[2019-07 Issue Prioritization]
Status to Tentatively Ready after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4820.
Modify 25.9.8 [inclusive.scan] as indicated:
template<class InputIterator, class OutputIterator, class BinaryOperation> OutputIterator inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op); template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class BinaryOperation> ForwardIterator2 inclusive_scan(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, BinaryOperation binary_op); template<class InputIterator, class OutputIterator, class BinaryOperation, class T> OutputIterator inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op, T init); template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class BinaryOperation, class T> ForwardIterator2 inclusive_scan(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, BinaryOperation binary_op, T init);-?- Let U be the value type of decltype(first).
-3- Requires:
(3.1) — If init is provided, T shall be Cpp17MoveConstructible (Table 26); otherwise,
ForwardIterator1's value typeU shall be Cpp17MoveConstructible.(3.2) — If init is provided, all of binary_op(init, init), binary_op(init, *first), and binary_op(*first, *first) shall be convertible to T; otherwise, binary_op(*first, *first) shall be convertible to
ForwardIterator1's value typeU.(3.3) — binary_op shall neither invalidate iterators or subranges, nor modify elements in the ranges [first, last] or [result, result + (last - first)].
Modify 25.9.10 [transform.inclusive.scan] as indicated:
template<class InputIterator, class OutputIterator, class BinaryOperation, class UnaryOperation> OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op, UnaryOperation unary_op); template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class BinaryOperation, class UnaryOperation> ForwardIterator2 transform_inclusive_scan(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, BinaryOperation binary_op, UnaryOperation unary_op); template<class InputIterator, class OutputIterator, class BinaryOperation, class UnaryOperation, class T> OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, BinaryOperation binary_op, UnaryOperation unary_op, T init); template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class BinaryOperation, class UnaryOperation, class T> ForwardIterator2 transform_inclusive_scan(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, BinaryOperation binary_op, UnaryOperation unary_op, T init);-?- Let U be the value type of decltype(first).
-1- Requires:
(1.1) — If init is provided, T shall be Cpp17MoveConstructible (Table 26); otherwise,
ForwardIterator1's value typeU shall be Cpp17MoveConstructible.(1.2) — If init is provided, all of
(1.2.1) — binary_op(init, init),
(1.2.2) — binary_op(init, unary_op(*first)), and
(1.2.3) — binary_op(unary_op(*first), unary_op(*first))
shall be convertible to T; otherwise, binary_op(unary_op(*first), unary_op(*first)) shall be convertible to
ForwardIterator1's value typeU.(1.3) — Neither unary_op nor binary_op shall invalidate iterators or subranges, nor modify elements in the ranges [first, last] or [result, result + (last - first)].
Section: 27.11.7.2 [time.zone.zonedtime.ctor] Status: Tentatively Ready Submitter: Tomasz Kamiński Opened: 2019-06-20 Last modified: 2019-09-25
Priority: 0
View other active issues in [time.zone.zonedtime.ctor].
View all other issues in [time.zone.zonedtime.ctor].
View all issues with Tentatively Ready status.
Discussion:
The zoned_time(TimeZonePtr z)
does not specify how the tp_
sub-element is initialized. It should be consistent with zoned_time(string_view)
that default initializes tp_
.
[2019-07 Issue Prioritization]
Status to Tentatively Ready after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4820.
Modify 27.11.7.2 [time.zone.zonedtime.ctor] as indicated:
explicit zoned_time(TimeZonePtr z);-5- Requires: z refers to a time zone.
-6- Effects: Constructs a zoned_time by initializing zone_ with std::move(z) and default constructing tp_.
Section: 27.11.7.2 [time.zone.zonedtime.ctor] Status: Tentatively Ready Submitter: Tomasz Kamiński Opened: 2019-06-20 Last modified: 2019-09-25
Priority: 0
View other active issues in [time.zone.zonedtime.ctor].
View all other issues in [time.zone.zonedtime.ctor].
View all issues with Tentatively Ready status.
Discussion:
The zoned_time
constructor from zoned_time<Duration2,
TimeZonePtr>
(preserving same time zone, different precision of
representation) is currently marked noexcept. Given that the exposition-only
member tp_ of type sys_time<duration> has essentially type
time_point<system_clock, Duration>, this is incompatible with the
invoked time_point
constructor, which is not marked as noexcept.
[2019-07 Issue Prioritization]
Status to Tentatively Ready after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4820.
Modify 27.11.7.1 [time.zone.zonedtime.overview], class template zoned_time synopsis, as indicated:
template<class Duration2> zoned_time(const zoned_time<Duration2, TimeZonePtr>& zt)noexcept;
Modify 27.11.7.2 [time.zone.zonedtime.ctor] as indicated:
template<class Duration2> zoned_time(const zoned_time<Duration2, TimeZonePtr>& y)noexcept;-9- Requires: Does not participate in overload resolution unless sys_time<Duration2> is implicitly convertible to sys_time<Duration>.
-10- Effects: Constructs a zoned_time by initializing zone_ with y.zone_ and tp_ with y.tp_.
Section: 27.13 [time.parse] Status: Tentatively Ready Submitter: Tomasz Kamiński Opened: 2019-06-29 Last modified: 2019-09-25
Priority: 0
View other active issues in [time.parse].
View all other issues in [time.parse].
View all issues with Tentatively Ready status.
Discussion:
The year format specifier ('y', 'Y') are missing the locale alternative
version ('%EY', '%Ey' and '%Oy'). That makes it inconsistent with the
POSIX
strftime
specification:
%Ey Replaced by the offset from %EC (year only) in the locale's alternative representation.
%EY Replaced by the full alternative year representation.
%Oy Replaced by the year (offset from %C) using the locale's alternative numeric symbols.
and parse
specifiers 27.13 [time.parse] that accepts these modified command.
[2019-07 Issue Prioritization]
Status to Tentatively Ready after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4820.
[Drafting note: For the '%Oy' specifier we preserve consistency with the current specification for '%Od' and '%Oe' from Table 87 "Meaning of
format
conversion specifier" [tab:time.format.spec]:
%d […] The modified command
%Od
produces the locale's alternative representation.%e […] The modified command
%Oe
produces the locale's alternative representation.as their corresponding POSIX specification is matching one for '%Oy':
%Od Replaced by the day of the month, using the locale's alternative numeric symbols, filled as needed with leading zeros if there is any alternative symbol for zero; otherwise, with leading <space> characters.
%Oe Replaced by the day of the month, using the locale's alternative numeric symbols, filled as needed with leading <space> characters.
]
Modify "Table 87 — Meaning of format
conversion specifiers"
[tab:time.format.spec] as indicated:
Table 87 — Meaning of format conversion specifiers [tab:time.format.spec] Specifier Replacement […] %y The last two decimal digits of the year. If the result is a single digit it is prefixed by 0. The modified command %Oy
produces the locale's alternative representation. The modified command%Ey
produces the locale's alternative representation of offset from%EC
(year only).%Y The year as a decimal number. If the result is less than four digits it is left-padded with 0 to four digits. The modified command %EY
produces the locale's alternative full year representation.[…]
Section: 27.8.15.2 [time.cal.ymdlast.members] Status: Tentatively Ready Submitter: Tomasz Kamiński Opened: 2019-06-29 Last modified: 2019-09-25
Priority: 0
View all issues with Tentatively Ready status.
Discussion:
The current specification of the year_month_day_last::day
function does not cover the behaviour in the situation when year_month_day_last
value is not ok()
. To illustrate the sentence from
27.8.15.2 [time.cal.ymdlast.members] p13:
A
day
representing the last day of the (year
,month
) pair represented by*this
.
is unclear in the situation when month
member has
!ok
value, e.g. what is last day of 14th month of 2019.
ymdl.day()
(and by
consequence conversion to sys_days
/local_days
)
unspecified if ymdl.ok()
is false
. This make is
consistent with rest of the library, that produces unspecified values in
similiar situation, e.g.: 27.8.14.2 [time.cal.ymd.members] p18,
27.8.16.2 [time.cal.ymwd.members] p19,
27.8.17.2 [time.cal.ymwdlast.members] p14.
[2019-07 Issue Prioritization]
Status to Tentatively Ready after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4820.
Modify 27.8.15.2 [time.cal.ymdlast.members] as indicated:
constexpr chrono::day day() const noexcept;-13- Returns: If ok() is true, returns a
-14- [Note: This value may be computed on demand. — end note]Aday representing the last day of the (year, month) pair represented by *this. Otherwise the returned value is unspecified.
Section: 27.11.7.1 [time.zone.zonedtime.overview] Status: Tentatively Ready Submitter: Tomasz Kamiński Opened: 2019-06-30 Last modified: 2019-09-25
Priority: 0
View other active issues in [time.zone.zonedtime.overview].
View all other issues in [time.zone.zonedtime.overview].
View all issues with Tentatively Ready status.
Discussion:
Currently, the time_zone
is always storing the time with
the precision not coarser that seconds
, as consequence any
instance with the duration with coarser precision with seconds
,
is de-facto equivalent to one instantiated to the duration of seconds.
This is caused by the fact, that time zone offset can be defined up to
seconds precision. To illustrate both of following specialization has
the same behavior (keep seconds
):
zoned_time<minutes> zt(current_zone(), floor<minutes>(system_clock::now()); zoned_time<hours> zt(current_zone(), floor<hours>(system_clock::now()); zoned_time<seconds> zt(current_zone(), floor<seconds>(system_clock::now());
To avoid unnecessary code bloat caused by above, most deduction guides
are instantiating zoned_time
with at least seconds
precision (i.e. zoned_time<seconds>
will be deduced
for all of above):
template<class TimeZonePtr, class Duration> zoned_time(TimeZonePtr, zoned_time<Duration>, choose = choose::earliest) -> zoned_time<common_type_t<Duration, seconds>, TimeZonePtr>;
However there is single exception:
template<class Duration, class TimeZonePtr, class TimeZonePtr2> zoned_time(TimeZonePtr, zoned_time<Duration, TimeZonePtr2>, choose = choose::earliest) -> zoned_time<Duration, TimeZonePtr>;
This deduction guide should be updated to preserve the consistency of design.
[2019-07 Issue Prioritization]
Status to Tentatively Ready after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4820.
Modify 27.11.7.1 [time.zone.zonedtime.overview] as indicated:
[…] template<class Duration, class TimeZonePtr, class TimeZonePtr2> zoned_time(TimeZonePtr, zoned_time<Duration, TimeZonePtr2>, choose = choose::earliest) -> zoned_time<common_type_t<Duration, seconds>, TimeZonePtr>; […]
parse
manipulator without abbreviation is not callableSection: 27.13 [time.parse] Status: Tentatively Ready Submitter: Tomasz Kamiński Opened: 2019-07-10 Last modified: 2019-09-25
Priority: 0
View other active issues in [time.parse].
View all other issues in [time.parse].
View all issues with Tentatively Ready status.
Discussion:
The parse
overload that does not accept the abbreviation but does accept an offset,
because the expression in the Remarks: clause:
from_stream(declval<basic_istream<charT, traits>*>(), fmt.c_str(), tp, nullptr, &offset)
is not valid. This is caused by deduction failure for the basic_string<charT, traits, Alloc>*
from nullptr
(see this link):
[2019-08-17 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after six positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
[Drafting note: As a drive-by fix the Remarks element is also converted to a Constraints element.]
Modify 27.13 [time.parse] as indicated:
template<class charT, class traits, class Alloc, class Parsable> unspecified parse(const basic_string<charT, traits, Alloc>& fmt, Parsable& tp, minutes& offset);-6-
RemarksConstraints:This function shall not participate in overload resolution unlessThe expressionfrom_stream(declval<basic_istream<charT, traits>&>(), fmt.c_str(), tp, declval<basic_string<charT, traits, Alloc>*>()nullptr, &offset)is
-7- Returns: A manipulator that, when extracted from a basic_istream<charT, traits> is, calls from_stream(is, fmt.c_str(), tp, static_cast<basic_string<charT, traits, Alloc>*>(nullptr), &offset).a validwell-formedexpressionwhen treated as an unevaluated operand.
Section: 27.12 [time.format] Status: Tentatively Ready Submitter: Victor Zverovich Opened: 2019-07-24 Last modified: 2019-09-25
Priority: 0
View other active issues in [time.format].
View all other issues in [time.format].
View all issues with Tentatively Ready status.
Discussion:
The chrono-spec grammar introduced by P1361R2 "Integration of chrono with text formatting" in section [time.format] is ambiguous because '%' can be interpreted as either literal-char or conversion-spec:
chrono-spec ::= literal-char | conversion-spec literal-char ::= <a character other than '{' or '}'> conversion-spec ::= '%' [modifier] type
[2019-08-17 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify the literal-char grammar in 27.12 [time.format] as indicated:
literal-char: any character other than {,or}, or %
Section: 29.11.7.3 [fs.path.req] Status: Tentatively Ready Submitter: Casey Carter Opened: 2019-08-02 Last modified: 2019-09-25
Priority: 0
View all issues with Tentatively Ready status.
Discussion:
std::filesystem::path has a number of functions - notably including a conversion constructor template (29.11.7.4.1 [fs.path.construct]) and assignment operator template (29.11.7.4.2 [fs.path.assign]) - that accept const Source&. Per 29.11.7.3 [fs.path.req] paragraph 2:
-2- Functions taking template parameters named Source shall not participate in overload resolution unless either
(2.1) — Source is a specialization of basic_string or basic_string_view, or
(2.2) — the qualified-id iterator_traits<decay_t<Source>>::value_type is valid and denotes a possibly const encoded character type.
iterator_traits<decay_t<path>>::value_type is not valid in C++17, so this specification was sufficient to guard against the conversion constructor template (respectively assignment operator template) "pretending" to be copy constructor (respectively copy assignment operator). P0896R4 "The One Ranges Proposal", however, altered the definition of iterator_traits in the working draft. It now has some convenient default behaviors for types that meet (roughly) the syntax of the Cpp17InputIterator requirements. Notably those requirements include copy construction and copy assignment.
In the working draft, to determine the copyability of std::filesystem::path we must perform overload resolution to determine if we can initialize a path from a constant lvalue of type path. The conversion constructor template that accepts const Source& is a candidate, since its second argument is defaulted, so we must perform template argument deduction to see if this constructor is viable. Source is deduced to path and we then must check the constraint from 29.11.7.3 [fs.path.req] paragraph 2.2 (above). Checking the constraint requires us to specialize iterator_traits<path>, which (per 23.3.2.3 [iterator.traits] paragraph 3.2) requires us to determine if path satisfies the exposition-only cpp17-input-iterator concept, which requires path to be copyable.
We've completed a cycle: determining if path is copyable requires us to first determine if path is copyable. This unfortunate constraint recursion can be broken by explicitly specifying that path is not a valid Source.
[2019-08-17 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after seven positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify 29.11.7.3 [fs.path.req] as indicated:
-2- Functions taking template parameters named Source shall not participate in overload resolution unless Source denotes a type other than path, and either
[…]
Section: 27.13 [time.parse] Status: Tentatively Ready Submitter: Tomasz Kamiński Opened: 2019-07-31 Last modified: 2019-09-25
Priority: 0
View other active issues in [time.parse].
View all other issues in [time.parse].
View all issues with Tentatively Ready status.
Discussion:
The current specification for the '%p' flag in "[tab:time.parse.spec]
Meaning of parse
flags" places a restriction of it's
placement with regards to the '%I' command:
The locale's equivalent of the AM/PM designations associated with a 12-hour clock. The command %I must precede %p in the format string.
This restriction makes the migration to new API more difficult, as it is not present for the POSIX strptime nor in the example implementation of the library. Per Howard's comment:
Actually this is an obsolete requirement and it should be struck. The first time I implemented this I didn't know how to do it without this requirement. I've since reimplemented it without needing this.
[2019-08-17 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after eight positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify Table 99 "Meaning of parse flags [tab:time.parse.spec]" in 27.13 [time.parse] as indicated:
Table 99: Meaning of parse flags [tab:time.parse.spec] Flag Parsed value […] %p The locale's equivalent of the AM/PM designations associated with a 12-hour clock. The command %I must precede %p in the format string.[…]
Section: 20.20.5.1 [format.arg] Status: Tentatively Ready Submitter: Richard Smith Opened: 2019-08-01 Last modified: 2019-09-25
Priority: 0
View all issues with Tentatively Ready status.
Discussion:
In P0645R10 20.?.5.1/ we find:
Constraints: typename Context::template formatter_type<T> is enabled.
… which doesn't mean anything, because that is an arbitrary type. Presumably the intent is that that type will always be a specialization of formatter, but there appear to be no constraints whatsoever on the Context template parameter, so there seems to be no requirement that that is the case.
Should basic_format_arg place some constraints on its Context template parameter? E.g., should it be required to be a specialization of basic_format_context? Victor Zverovich: The intent here is to allow different context types provide their own formatter extension types. The default formatter context and extension are basic_format_context and formatter respectively, but it's possible to have other. For example, in the fmt library there is a formatter context that supports printf formatting for legacy code. It cannot use the default formatter specializations because of the different syntax (%... vs {...}). Richard Smith: In either case, the specification here seems to be missing the rules for what is a valid Context parameter. I'm happy to editorially change "is enabled" to "is an enabled specialization of formatter", since there's nothing else that this could mean, but we still need a wording fix for the broader issue here. Here's what I have so far for this wording:Constraints: The template specialization typename Context::template formatter_type<T> is an enabled specialization of formatter ([formatter.requirements]).
Tim Song:
I think what we actually want here is "typename Context::template formatter_type<T> meets the Formatter requirements".[2019-08-17 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after six positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify 20.20.5.1 [format.arg] as indicated:
template<class T> explicit basic_format_arg(const T& v) noexcept;-4- Constraints: The template specialization
typename Context::template formatter_type<T>
is an enabled specialization of formattermeets the Formatter requirements (20.20.4 [format.formatter]). The extent to which an implementation determines that the specializationis enabledmeets the Formatter requirements is unspecified, except that as a minimum the expressiontypename Context::template formatter_type<T>() .format(declval<const T&>(), declval<Context&>())shall be well-formed when treated as an unevaluated operand.
Section: 29.10.2.1 [syncstream.syncbuf.overview] Status: Tentatively Ready Submitter: Nevin Liber Opened: 2019-08-06 Last modified: 2019-09-25
Priority: 0
View all issues with Tentatively Ready status.
Discussion:
When P0935 "Eradicating unnecessarily explicit default constructors from the standard library" was applied, basic_syncbuf was not in the working paper. basic_syncbuf should not have an explicit default constructor.
[2019-09-02 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after seven positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify 29.10.2.1 [syncstream.syncbuf.overview], class template basic_syncbuf synopsis, as indicated:
template<class charT, class traits, class Allocator> class basic_syncbuf : public basic_streambuf<charT, traits> { public: […] // 29.10.2.2 [syncstream.syncbuf.cons], construction and destruction basic_syncbuf() : basic_syncbuf(nullptr) {} explicit basic_syncbuf(streambuf_type* obuf= nullptr) : basic_syncbuf(obuf, Allocator()) {} […] };
Section: 17.3.1 [support.limits.general] Status: Tentatively Ready Submitter: Antony Polukhin Opened: 2019-08-14 Last modified: 2019-09-25
Priority: 0
View other active issues in [support.limits.general].
View all other issues in [support.limits.general].
View all issues with Tentatively Ready status.
Discussion:
Feature testing macro from P0202 "Add Constexpr Modifiers to Functions in <algorithm> and <utility> Headers" is missing in the WD.
For user convenience and to reduce feature testing macro count it would be better to stick to initial version of P0202 that was providing only the __cpp_lib_constexpr_algorithms. So remove __cpp_lib_constexpr_swap_algorithms, define __cpp_lib_constexpr_algorithms to 201703L if P0202 is implemented, to 201806L if P0202+P0879 are implemented.[2019-09-02 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify the Table 36 "Standard library feature-test macros" [tab:support.ft] in 17.3.1 [support.limits.general] as indicated:
Table 36: Standard library feature-test macros [tab:support.ft] Macro name Value Header(s) […] __cpp_lib_constexpr_ swap_algorithms201806L <algorithm> […]
Section: 17.3.1 [support.limits.general] Status: Tentatively Ready Submitter: Antony Polukhin Opened: 2019-08-14 Last modified: 2019-09-25
Priority: 0
View other active issues in [support.limits.general].
View all other issues in [support.limits.general].
View all issues with Tentatively Ready status.
Discussion:
P0858 "Constexpr iterator requirements" suggested to update the feature-testing macros __cpp_lib_string_view and __cpp_lib_array_constexpr to the date of adoption.
That did not happen.[2019-09-02 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify the Table 36 "Standard library feature-test macros" [tab:support.ft] in 17.3.1 [support.limits.general] as indicated:
Table 36: Standard library feature-test macros [tab:support.ft] Macro name Value Header(s) […] __cpp_lib_array_constexpr 201 6803L<iterator> <array> […] __cpp_lib_string_view 201 606803L<string> <string_view> […]
Section: 23.3.1 [iterator.requirements.general] Status: Tentatively Ready Submitter: Daniel Krügler Opened: 2019-08-18 Last modified: 2019-09-25
Priority: 0
View other active issues in [iterator.requirements.general].
View all other issues in [iterator.requirements.general].
View all issues with Tentatively Ready status.
Discussion:
The current definition of constexpr iterators is specified in 23.3.1 [iterator.requirements.general] p16 as follows:
Iterators are called constexpr iterators if all operations provided to meet iterator category requirements are constexpr functions, except for
(16.1) — a pseudo-destructor call (7.5.4.3 [expr.prim.id.dtor]), and
(16.2) — the construction of an iterator with a singular value.
With the acceptance of some proposals during the Cologne 2019 meeting, these additional requirements become mostly obsolete, as it had already been pointed out during that meeting:
With the acceptance of P0784R7, destructors can be declared constexpr and it is possible to perform a pseudo-destructor call within a constant expression, so bullet (16.1) is no longer a necessary requirement. With the acceptance of P1331R2, trivial default initialization in constexpr contexts is now possible, and there is no longer a requirement to initialize all sub-objects of a class object within a constant expression. It seems to me that we should simply strike the above two constraining requirements of the definition of constexpr iterators for C++20.[2019-09-14 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after five positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify 23.3.1 [iterator.requirements.general] as indicated:
-16- Iterators are called constexpr iterators if all operations provided to meet iterator category requirements are constexpr functions.
, except for
(16.1) — a pseudo-destructor call (7.5.4.3 [expr.prim.id.dtor]), and
(16.2) — the construction of an iterator with a singular value.
Section: 20.19.1 [charconv.syn] Status: Tentatively Ready Submitter: Jens Maurer Opened: 2019-08-23 Last modified: 2019-09-25
Priority: 0
View all issues with Tentatively Ready status.
Discussion:
20.19.2 [charconv.to.chars] does not present an overload for bool (because it is neither a signed nor unsigned integer type), so an attempt to call to_chars with a bool argument would promote it to int and unambiguously call the int overload of to_chars.
This was not intended, since it is not obvious that the correct textual representation of a bool is 0/1 (as opposed to, say, "true"/"false"). The user should cast explicitly if he wants the 0/1 behavior. (Correspondingly, there is no bool overload for from_chars in the status quo, and conversions do not apply there because of the reference parameter.)[2019-09-14 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after eight positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify 20.19.1 [charconv.syn], header <charconv> synopsis, as indicated:
[…] // 20.19.2 [charconv.to.chars], primitive numerical output conversion struct to_chars_result { char* ptr; errc ec; friend bool operator==(const to_chars_result&, const to_chars_result&) = default; }; to_chars_result to_chars(char* first, char* last, see below value, int base = 10); to_chars_result to_chars(char* first, char* last, bool value, int base = 10) = delete; to_chars_result to_chars(char* first, char* last, float value); […]
Section: 27.12 [time.format], 27.13 [time.parse] Status: Tentatively Ready Submitter: Howard Hinnant Opened: 2019-09-02 Last modified: 2019-10-06
Priority: 0
View other active issues in [time.format].
View all other issues in [time.format].
View all issues with Tentatively Ready status.
Discussion:
It is clear how "%I%p" parses and formats time points. What is not clear is how these flags interact with durations. We should treat durations as "elapsed time since midnight". For example:
#include <chrono> #include <iostream> #include <string> #include <sstream> int main() { using namespace std; using namespace std::chrono; // Format { // format time_point with %I%p cout << format("{:%F %I%p}", sys_days{2019_y/August/10}+14h) << '\n'; } { // format duration with %I%p cout << format("{:%I%p}", 14h) << '\n'; } // Parse { // Parse %I%p as day-of-year combined with an hour into a time_point istringstream in{"2019-08-10 2pm"}; system_clock::time_point tp; in >> parse("%F %I%p", tp); cout << tp << '\n'; } { // Parse %I%p as number of hours into a duration istringstream in{"2pm"}; hours d; in >> parse("%I%p", d); cout << d << '\n'; } }
Output:
2019-08-10 02PM 02PM 2019-08-10 14:00:00.000000 14h
[2019-10 Status set to 'Tentatively Ready' after reflector discussion]
Proposed resolution:
This wording is relative to N4830.
Modify 27.12 [time.format] as indicated:
-3- Unless explicitly requested, the result of formatting a chrono type does not contain time zone abbreviation and time zone offset information. If the information is available, the conversion specifiers %Z and %z will format this information (respectively). [Note: If the information is not available and a %Z or %z conversion specifier appears in the chrono-format-spec, an exception of type format_error is thrown, as described above. — end note]
-?- If the type being formatted does not contain the information that the format flag needs, an exception of type format_error is thrown. [Example: A duration does not contain enough information to format as a weekday — end example]. However if a flag refers to a "time of day" (e.g. %H, %I, %p, etc.), then a specialization of duration is interpreted as the time of day elapsed since midnight.
Modify 27.13 [time.parse] as indicated:
[Drafting note: The modification of 27.13 [time.parse] p1 is intended to be non-conflictingly mergeable with the change suggested by LWG 3269 and LWG 3271 at the same paragraph.]
-1- Each parse overload specified in this subclause calls from_stream unqualified, so as to enable argument dependent lookup (6.5.2 [basic.lookup.argdep]). In the following paragraphs, let is denote an object of type basic_istream<charT, traits>, where charT and traits are template parameters in that context.
[…] -10- All from_stream overloads behave as unformatted input functions, except that they have an unspecified effect on the value returned by subsequent calls to basic_istream<>::gcount(). Each overload takes a format string containing ordinary characters and flags which have special meaning. Each flag begins with a %. Some flags can be modified by E or O. During parsing each flag interprets characters as parts of date and time types according to Table [tab:time.parse.spec]. Some flags can be modified by a width parameter given as a positive decimal integer called out as N below which governs how many characters are parsed from the stream in interpreting the flag. All characters in the format string that are not represented in Table [tab:time.parse.spec], except for white space, are parsed unchanged from the stream. A white space character matches zero or more white space characters in the input stream. -?- If the type being parsed can not represent the information that the format flag refers to, is.setstate(ios_base::failbit) is called. [Example: A duration cannot represent a weekday — end example]. However if a flag refers to a "time of day" (e.g. %H, %I, %p, etc.), then a specialization of duration is parsed as the time of day elapsed since midnight.
Section: 27.8.7.2 [time.cal.wdidx.members] Status: Tentatively Ready Submitter: Howard Hinnant Opened: 2019-09-02 Last modified: 2019-09-25
Priority: 0
View all issues with Tentatively Ready status.
Discussion:
On one hand, we say that if you try to construct a weekday_indexed with index 0, you get an unspecified index instead (27.8.7.2 [time.cal.wdidx.members]/p1),:
The values held are unspecified if !wd.ok() or index is not in the range [1, 5].
OTOH, we take pains to pin down year_month_weekday's conversion to sys_days when the index is zero (27.8.7.2 [time.cal.wdidx.members]/p19):
If index() is 0 the returned sys_days represents the date 7 days prior to the first weekday() of year()/month().
This is inconsistent. We should allow a slightly wider range (say, [0, 7], since you need at least 3 bits anyway to represent the 5 distinct valid values, and the 0 value referred to by 27.8.7.2 [time.cal.wdidx.members]/p19.
[2019-09-24 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after six positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify 27.8.7.2 [time.cal.wdidx.members] as indicated:
[Drafting note: As a drive-by fix a cleanup of "Constructs an object of type weekday_indexed" wording has been applied as well. ]
constexpr weekday_indexed(const chrono::weekday& wd, unsigned index) noexcept;-1- Effects:
Constructs an object of type weekday_indexed by initializingInitializes wd_ with wd and index_ with index. The values held are unspecified if !wd.ok() or index is not in the range [10,57].
Section: 17.3.1 [support.limits.general] Status: Tentatively Ready Submitter: Jonathan Wakely Opened: 2019-09-05 Last modified: 2019-09-25
Priority: 0
View other active issues in [support.limits.general].
View all other issues in [support.limits.general].
View all issues with Tentatively Ready status.
Discussion:
There is no feature test macro for std::span.
For the purposes of SD-6, I think we want two values: 201803L for the original addition of <span> by P0122R7 (Jacksonville, 2018) and then 201902L for the API changes from P1024R3 (Kona, 2019). The C++ working draft only needs the newer value.[2019-09-24 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after eight positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify the Table 36 "Standard library feature-test macros" [tab:support.ft] in 17.3.1 [support.limits.general] as indicated:
Table 36: Standard library feature-test macros [tab:support.ft] Macro name Value Header(s) […] __cpp_lib_span 201902L <span> […]
Section: 24.7.11.4 [range.split.outer.value] Status: Tentatively Ready Submitter: Eric Niebler Opened: 2019-09-09 Last modified: 2019-09-25
Priority: 0
View all issues with Tentatively Ready status.
Discussion:
It is a view. It should have all the view goodies. Suggested priority P1 because it affects ABI.
The proposed change has been implemented and tested in range-v3.[2019-09-24 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after six positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify 24.7.11.4 [range.split.outer.value], class split_view::outer_iterator::value_type synopsis, as indicated:
namespace std::ranges { template<class V, class Pattern> template<bool Const> struct split_view<V, Pattern>::outer_iterator<Const>::value_type : view_interface<value_type> { private: outer_iterator i_ = outer_iterator(); // exposition only public: value_type() = default; constexpr explicit value_type(outer_iterator i); constexpr inner_iterator<Const> begin() const; constexpr default_sentinel_t end() const; }; }
Section: 23.3.4.13 [iterator.concept.random.access] Status: Tentatively Ready Submitter: Eric Niebler Opened: 2019-09-09 Last modified: 2019-09-25
Priority: 0
View other active issues in [iterator.concept.random.access].
View all other issues in [iterator.concept.random.access].
View all issues with Tentatively Ready status.
Discussion:
See 23.3.4.13 [iterator.concept.random.access]/2.6, which shows ++ being applied to a prvalue iterator.
A similar change has already been made to 24.6.3.2 [range.iota.view]/4.6. Suggest priority P0 or P1 because it effects the definition of a concept.[2019-09-24 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after six positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify 23.3.4.13 [iterator.concept.random.access] as indicated:
-2- Let a and b be valid iterators of type I such that b is reachable from a after n applications of ++a, let D be iter_difference_t<I>, and let n denote a value of type D. I models random_access_iterator only if
(2.1) — (a += n) is equal to b.
[…]
(2.6) — If (a + D(n - 1)) is valid, then (a + n) is equal to
++[](I c){ return ++c; }(a + D(n - 1)).[…]