<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 9, 2016 at 3:20 PM, Craig, Ben via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
From the C++14 spec...<br>
<br>
<blockquote>17.6.5.2 Headers [res.on.headers]<br>
1 A C++ header may include other C++ headers. A C++ header shall
provide the declarations and definitions<br>
that appear in its synopsis. A C++ header shown in its synopsis as
including other C++ headers shall provide<br>
the declarations and definitions that appear in the synopses of
those other headers.<br>
</blockquote>
<br>
I'm not 100% sure I know what this means. If a header (say...
<system_error>) mentions a class (like std::string), is it
required to provide the full definition for std::string, or is the
forward declared template good enough? </div></blockquote><div><br></div><div>According to the standard <system_header> does not need <string> even though the synopsis mentions it. A forward declaration is good enough.</div><div>Although <system_header> mentions string, the synopsis for that header doesn't declare or define std::string so [res.on.headers] doesn't apply.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">Right now, libcxx uses the
forward declaration. What about entities that have specializations
scattered all over the place, like std::hash? Is the unspecialized
forward declaration good enough, or does the full bulk of all the
std::hash specializations have to come along too?<span class="HOEnZb"><font color="#888888"><br>
<br>
<br></font></span></div></blockquote><div><br></div><div>I don't think all of the specialization need to come along. I'm not sure what the QoI implications are though. Could you provide some motivation as to why you asked this question? <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span class="HOEnZb"><font color="#888888">
<pre cols="72">--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
</pre>
</font></span></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>