Skip to content

Commit eb501ac

Browse files
committed
Provide some discussion results from Issaquah meeting
1 parent b4d7e59 commit eb501ac

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

xml/issue2118.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,39 @@ create private templated overloads of these members. &mdash; <i>end note</i>]
183183
</p></blockquote></blockquote>
184184
</blockquote>
185185

186+
<note>2014-02, Issaquah</note>
187+
<p>
188+
GR: want to prevent unsafe conversions. Standard is inconsistent how it does this. for <tt>reset()</tt> has deleted function
189+
template capturing everything except the known-safe cases. Other functions use SFINAE. Main reason this is hard is that
190+
<tt>unique_ptr</tt> supports fancy pointers. Have to figure out how to handle them and what requirements to put on them.
191+
Requirements are minimal, not even required to work with <tt>pointer_traits</tt>.
192+
<p/>
193+
STL surprised <tt>pointer_traits</tt> doesn't work
194+
<p/>
195+
GR: ways to get fancy pointers to work is to delegate responsibility for preventing unsafe conversions to the fancy pointers themselves.
196+
Howard doesn't like that, he wants even fancy pointers to be prevented from doing unsafe conversions in <tt>unique_ptr</tt> contexts.
197+
<p/>
198+
AM: Howard says <tt>unique_ptr</tt> was meant to be very very safe under all conditions, this open a hole in that. Howard wants to
199+
eke forward and support more, but not if we open any holes in type safety.
200+
<p/>
201+
GR: do we need to be typesafe even for fancy types with incorrect <tt>pointer_traits</tt>?
202+
<p/>
203+
AM: that would mean it's only unsafe for people who lie by providing a broken specialization of <tt>pointer_traits</tt>
204+
<p/>
205+
GR: probably can't continue with ambiguity between using SFINAE and ill-formedness. Would appreciate guidance on direction used for that.
206+
<p/>
207+
STL: difference is observable in convertibility using type traits.
208+
<p/>
209+
STL: for <tt>reset()</tt> which doesn't affect convertibility ill-formed allows <tt>static_assert</tt>, better diagnostic.
210+
For assignment it's detectable and has traits, constraining them is better.
211+
<p/>
212+
EN: I strongly prefer constraints than <tt>static_asserts</tt>
213+
<p/>
214+
STL: if we could rely on <tt>pointer_traits</tt> that might be good. Alternatively could we add more machinery to deleter?
215+
make deleter say conversions are allowed, otherwise we lock down all conversions. basically want to know if converting <tt>U</tt> to
216+
<tt>T</tt> is safe.
217+
</p>
218+
186219
</discussion>
187220

188221
<resolution>

xml/issue2319.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ all times, including in their default-constructed and moved-from states. This me
1717
constructors may throw exceptions. Therefore, the Standard should not mark them as <tt>noexcept</tt>. (Other implementations will
1818
still be permitted to add <tt>noexcept</tt>.)
1919
</p>
20+
21+
<note>2014-02, Issaquah</note>
22+
<p>
23+
The issue discussion was highly controversial: The arguments in favour was that implementations exist that always need to allocate
24+
memory even for the move operations (similar as for some other containers) and that this cleans up an inconsistency between <tt>std::string</tt>
25+
and other container types. Counter arguments were that potentially throwing move operations reduce much of the advantages of move-support,
26+
e.g. in <tt>vector&lt;string&gt;</tt>.
27+
<p/>
28+
Straw polls did not gave conclusive results to accept the suggested wording. It was suggested to introduce a special library
29+
vocabulary that specifies a "normative encouragement to not throw exceptions" for functions like these.
30+
<p/>
31+
NJ: I offer to write a proposal to add encouragement for not throwing ... "<tt>noexcept</tt> in italics means should not throw"
32+
</p>
2033
</discussion>
2134

2235
<resolution>

0 commit comments

Comments
 (0)