File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,37 @@ of the special member functions.
4848Set priority to 3 after reflector poll. Arthur to draft wording.
4949</p >
5050
51+ <note >2024-12-06; LWG telecon</note >
52+ <p >
53+ <sref ref =" [list.modifiers]" /> p1 says:
54+ <blockquote >
55+ <i >Complexity</i >:
56+ Insertion of a single element into a list takes constant time and exactly
57+ one call to a constructor of `T`.
58+ Insertion of multiple elements into a list is linear in the number of elements inserted,
59+ and the number of calls to the copy constructor or move constructor of `T`
60+ is exactly equal to the number of elements inserted.
61+ </blockquote >
62+ In addition to incorrectly talking about "the copy constructor or move
63+ constructor", it should not should not talk about any "call to a constructor"
64+ because scalars and aggregates do not have constructors at all.
65+ We should talk about calls to `allocator_traits::construct` not constructors.
66+ </p >
67+ <p >
68+ Similarly, p5 says:
69+ <blockquote >
70+ <i >Complexity</i >:
71+ Erasing a single element is a constant time operation with
72+ a single call to the destructor of `T`.
73+ Erasing a range in a list is linear time in the size of the range
74+ and the number of calls to the destructor of type `T`
75+ is exactly equal to the size of the range.
76+ </blockquote >
77+ This should talk about calls to `allocator_traits::destroy`.
78+ </p >
79+ <p >
80+ Look for similar problems elsewhere.
81+ </p >
5182</discussion >
5283
5384<resolution >
You can’t perform that action at this time.
0 commit comments