<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,<br>
</p>
<p><br>
</p>
<p>I'm having trouble understanding the semantics of DeclContext. The documentation on this class (as of 3.9) refers to "declaration contexts" which it does not define and which does not seem to be a concept from the standard.<br>
</p>
<p><br>
</p>
<p>How was it determined which classes should inherit DeclContext? When should a nested DeclContext be added and when is it okay to use an existing DeclContext?<br>
</p>
<p><br>
</p>
<p>For example, DeclContext cannot correspond directly to declarative regions as defined in [basic.scope.declarative] (3.3.1) because only Decl subtypes inherit it. A block, for example, is something that opens a new region, and in the AST it is a CompoundStmt, which
is not a Decl.<br>
</p>
<p><br>
</p>
<p>Also, how bad of an idea would it be to change the type hierarchy so more classes inherit DeclContext?<br>
</p>
<p><br>
</p>
<p>Thanks,<br>
</p>
<p>David Fontaine<br>
</p>
<DIV>
<HR>
</DIV>
<DIV>This email message is for the sole use of the intended recipient(s) and may
contain confidential information. Any unauthorized review, use, disclosure
or distribution is prohibited. If you are not the intended recipient,
please contact the sender by reply email and destroy all copies of the original
message. </DIV>
<DIV>
<HR>
</DIV>
</body>
</html>