Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54183 - sandbox/committee/LWG/proposals
From: dgregor_at_[hidden]
Date: 2009-06-22 02:46:59


Author: dgregor
Date: 2009-06-22 02:46:57 EDT (Mon, 22 Jun 2009)
New Revision: 54183
URL: http://svn.boost.org/trac/boost/changeset/54183

Log:
Start laying out standardese for D2918
Added:
   sandbox/committee/LWG/proposals/Makefile (contents, props changed)
   sandbox/committee/LWG/proposals/exported-concept-maps.css (contents, props changed)
Text files modified:
   sandbox/committee/LWG/proposals/exported-concept-maps.rst | 55 +++++++++++++++++++++++++++++++++++++--
   1 files changed, 52 insertions(+), 3 deletions(-)

Added: sandbox/committee/LWG/proposals/Makefile
==============================================================================
--- (empty file)
+++ sandbox/committee/LWG/proposals/Makefile 2009-06-22 02:46:57 EDT (Mon, 22 Jun 2009)
@@ -0,0 +1,2 @@
+exported-concept-maps.html: exported-concept-maps.rst exported-concept-maps.css
+ rst2html.py --stylesheet=exported-concept-maps.css --embed-stylesheet exported-concept-maps.rst exported-concept-maps.html
\ No newline at end of file

Added: sandbox/committee/LWG/proposals/exported-concept-maps.css
==============================================================================
--- (empty file)
+++ sandbox/committee/LWG/proposals/exported-concept-maps.css 2009-06-22 02:46:57 EDT (Mon, 22 Jun 2009)
@@ -0,0 +1,278 @@
+/*
+:Author: David Goodger (goodger_at_[hidden])
+:Id: $Id$
+:Copyright: This stylesheet has been placed in the public domain.
+
+Default cascading style sheet for the HTML output of Docutils.
+
+See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
+customize this style sheet.
+*/
+
+/* used to remove borders from tables and images */
+.borderless, table.borderless td, table.borderless th {
+ border: 0 }
+
+table.borderless td, table.borderless th {
+ /* Override padding for "table.docutils td" with "! important".
+ The right padding separates the table cells. */
+ padding: 0 0.5em 0 0 ! important }
+
+.first {
+ /* Override more specific margin styles with "! important". */
+ margin-top: 0 ! important }
+
+.last, .with-subtitle {
+ margin-bottom: 0 ! important }
+
+.hidden {
+ display: none }
+
+a.toc-backref {
+ text-decoration: none ;
+ color: black }
+
+blockquote.epigraph {
+ margin: 2em 5em ; }
+
+dl.docutils dd {
+ margin-bottom: 0.5em }
+
+/* Uncomment (and remove this text!) to get bold-faced definition list terms
+dl.docutils dt {
+ font-weight: bold }
+*/
+
+div.abstract {
+ margin: 2em 5em }
+
+div.abstract p.topic-title {
+ font-weight: bold ;
+ text-align: center }
+
+div.admonition, div.attention, div.caution, div.danger, div.error,
+div.hint, div.important, div.note, div.tip, div.warning {
+ margin: 2em ;
+ border: medium outset ;
+ padding: 1em }
+
+div.admonition p.admonition-title, div.hint p.admonition-title,
+div.important p.admonition-title, div.note p.admonition-title,
+div.tip p.admonition-title {
+ font-weight: bold ;
+ font-family: sans-serif }
+
+div.attention p.admonition-title, div.caution p.admonition-title,
+div.danger p.admonition-title, div.error p.admonition-title,
+div.warning p.admonition-title {
+ color: red ;
+ font-weight: bold ;
+ font-family: sans-serif }
+
+/* Uncomment (and remove this text!) to get reduced vertical space in
+ compound paragraphs.
+div.compound .compound-first, div.compound .compound-middle {
+ margin-bottom: 0.5em }
+
+div.compound .compound-last, div.compound .compound-middle {
+ margin-top: 0.5em }
+*/
+
+div.dedication {
+ margin: 2em 5em ;
+ text-align: center ;
+ font-style: italic }
+
+div.dedication p.topic-title {
+ font-weight: bold ;
+ font-style: normal }
+
+div.figure {
+ margin-left: 2em ;
+ margin-right: 2em }
+
+div.footer, div.header {
+ clear: both;
+ font-size: smaller }
+
+div.line-block {
+ display: block ;
+ margin-top: 1em ;
+ margin-bottom: 1em }
+
+div.line-block div.line-block {
+ margin-top: 0 ;
+ margin-bottom: 0 ;
+ margin-left: 1.5em }
+
+div.sidebar {
+ margin: 0 0 0.5em 1em ;
+ border: medium outset ;
+ padding: 1em ;
+ background-color: #ffffee ;
+ width: 40% ;
+ float: right ;
+ clear: right }
+
+div.sidebar p.rubric {
+ font-family: sans-serif ;
+ font-size: medium }
+
+div.system-messages {
+ margin: 5em }
+
+div.system-messages h1 {
+ color: red }
+
+div.system-message {
+ border: medium outset ;
+ padding: 1em }
+
+div.system-message p.system-message-title {
+ color: red ;
+ font-weight: bold }
+
+div.topic {
+ margin: 2em }
+
+h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
+h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
+ margin-top: 0.4em }
+
+h1.title {
+ text-align: center }
+
+h2.subtitle {
+ text-align: center }
+
+hr.docutils {
+ width: 75% }
+
+img.align-left {
+ clear: left }
+
+img.align-right {
+ clear: right }
+
+ol.simple, ul.simple {
+ margin-bottom: 1em }
+
+ol.arabic {
+ list-style: decimal }
+
+ol.loweralpha {
+ list-style: lower-alpha }
+
+ol.upperalpha {
+ list-style: upper-alpha }
+
+ol.lowerroman {
+ list-style: lower-roman }
+
+ol.upperroman {
+ list-style: upper-roman }
+
+p.attribution {
+ text-align: right ;
+ margin-left: 50% }
+
+p.caption {
+ font-style: italic }
+
+p.credits {
+ font-style: italic ;
+ font-size: smaller }
+
+p.label {
+ white-space: nowrap }
+
+p.rubric {
+ font-weight: bold ;
+ font-size: larger ;
+ color: maroon ;
+ text-align: center }
+
+p.sidebar-title {
+ font-family: sans-serif ;
+ font-weight: bold ;
+ font-size: larger }
+
+p.sidebar-subtitle {
+ font-family: sans-serif ;
+ font-weight: bold }
+
+p.topic-title {
+ font-weight: bold }
+
+pre.address {
+ margin-bottom: 0 ;
+ margin-top: 0 ;
+ font: inherit }
+
+pre.literal-block, pre.doctest-block {
+ margin-left: 2em ;
+ margin-right: 2em }
+
+span.classifier {
+ font-family: sans-serif ;
+ font-style: oblique }
+
+span.classifier-delimiter {
+ font-family: sans-serif ;
+ font-weight: bold }
+
+span.interpreted {
+ font-family: sans-serif }
+
+span.option {
+ white-space: nowrap }
+
+span.pre {
+ white-space: pre }
+
+span.problematic {
+ color: red }
+
+span.section-subtitle {
+ /* font-size relative to parent (h1..h6 element) */
+ font-size: 80% }
+
+table.citation {
+ border-left: solid 1px gray;
+ margin-left: 1px }
+
+table.docinfo {
+ margin: 2em 4em }
+
+table.docutils {
+ margin-top: 0.5em ;
+ margin-bottom: 0.5em }
+
+table.footnote {
+ border-left: solid 1px black;
+ margin-left: 1px }
+
+table.docutils td, table.docutils th,
+table.docinfo td, table.docinfo th {
+ padding-left: 0.5em ;
+ padding-right: 0.5em ;
+ vertical-align: top }
+
+table.docutils th.field-name, table.docinfo th.docinfo-name {
+ font-weight: bold ;
+ text-align: left ;
+ white-space: nowrap ;
+ padding-left: 0 }
+
+h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
+h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
+ font-size: 100% }
+
+ul.auto-toc {
+ list-style-type: none }
+
+/* DPG customizations */
+.ins { background-color:#A0FFA0 }
+.del { background-color:#FFA0A0 }
+.emphasis { font-style: italic }
+.pre { font-family: monospace }
\ No newline at end of file

Modified: sandbox/committee/LWG/proposals/exported-concept-maps.rst
==============================================================================
--- sandbox/committee/LWG/proposals/exported-concept-maps.rst (original)
+++ sandbox/committee/LWG/proposals/exported-concept-maps.rst 2009-06-22 02:46:57 EDT (Mon, 22 Jun 2009)
@@ -4,12 +4,23 @@
 
 :Authors: Dave Abrahams <dave_at_[hidden]> and Doug Gregor <doug.gregor_at_[hidden]>
 :Number: D2918=09-0108
-:Abstract:
 :Date: 2009-06-22
 
 :Abstract: We propose a mechanism that allows default associated
            functions to be used in unconstrained code.
 
+.. role:: ins
+ :class: ins
+
+.. role:: ins-emphasis
+ :class: ins emphasis
+
+.. role:: ins-pre
+ :class: ins pre
+
+.. role:: del
+ :class: del
+
 Summary
 =======
 
@@ -32,7 +43,7 @@
        { ... }
   };
   
- concept_map LessThanComparable<Num>; // OK
+ concept_map LessThanComparable<Num> { }// OK
   
 Now all four operators required by ``LessThanComparable`` can be
 applied to ``Num`` in a constrained template where
@@ -60,7 +71,7 @@
 We propose to allow ``concept_map``\ s to be explicitly “exported” to unconstrained
 contexts like this::
 
- export concept_map LessThanComparable<Num>; // OK
+ export concept_map LessThanComparable<Num> { } // OK
   
 Then the unconstrained definition of ``f`` above will work as might be
 expected. We also propose that concept maps generated with the
@@ -98,8 +109,46 @@
 Proposed Wording
 ================
 
+Modify the grammar in 14.10.2 [concept.map] as follows:
+
+ *concept-map-definition*:
+ :ins:`export`\ |opt| *concept_map* ::\ |opt| *nested-name-specifier*\ |opt| *concept-id* { *concept-map-member-specification*\ |opt| } ;\ |opt|
+
+Modify paragraph 6 of [concept.map] as follows:
+
+6. A concept map member that satisfies a requirement member cannot be found by any form of name lookup (3.4) :ins:`unless it is a member of an exported concept map ([concept.map.export])`.
+
+Add a new paragraph at the end of [concept.map]:
+
+15. :ins:`A concept-map-definition that starts with` :ins-pre:`export` :ins:`defines an exported concept map ([concept.map.export]).`
+
+Add a new section 14.10.2.3 Exported concept maps [concept.map.export]:
+
+1. :ins:`An` :ins-emphasis:`exported concept map` :ins:`is a concept map for which each concept map member that satisfies a requirement member corresponding to an associated function requirement can be found by name lookup in the namespace enclosing the concept map. These concept map members are called` :ins-emphasis:`exported associated member function definitions`\ :ins:`. [Example:` ::
+
+ concept EQ<typename T> {
+ bool operator==(const T& x, const T& y);
+ bool operator!=(const T& x, const T& y) { return !(x == y); }
+ }
+
+ struct X { bool operator==(const X&) const; };
+
+ export concept_map EQ<X> { }
+
+ bool f(X x, X y) {
+ return x != y; // okay: name lookup finds EQ<X>::operator!=
+ }
+
+ :ins:`- end example]`
+
+2. Deal with template argument deduction issues for concept map templates.
+
+3. Deal with member function requirements.
+
 
 Acknowledgements
 ================
 
 
+.. |opt| replace:: :sub:`opt`
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk