Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2008-05-28 16:20:37


Author: dgregor
Date: 2008-05-28 16:20:36 EDT (Wed, 28 May 2008)
New Revision: 45878
URL: http://svn.boost.org/trac/boost/changeset/45878

Log:
Add issue from Daniel Kruegler regarding associated function specifiers
Added:
   sandbox/committee/concepts/issues/issues/issue31.xml (contents, props changed)
Text files modified:
   sandbox/committee/concepts/issues/section.data | 6 ++++++
   1 files changed, 6 insertions(+), 0 deletions(-)

Added: sandbox/committee/concepts/issues/issues/issue31.xml
==============================================================================
--- (empty file)
+++ sandbox/committee/concepts/issues/issues/issue31.xml 2008-05-28 16:20:36 EDT (Wed, 28 May 2008)
@@ -0,0 +1,42 @@
+<?xml version='1.0' encoding='iso-8859-1' standalone='no'?>
+<!DOCTYPE issue SYSTEM "lwg-issue.dtd" [
+ <!ENTITY nbsp "&#160;">
+] >
+
+<issue num="31" status="Open">
+<title>Which specifiers are legal for associated functions?</title>
+<section><sref ref="[concept.fct]"/></section>
+<submitter>Daniel Kruegler</submitter>
+<date>28 May 2008</date>
+
+<discussion>
+ <p>[concept.fct] describes some explicit exclusions for function
+ specifiers on associated functions, but can we conclude from this
+ that all other specifiers are feasible? Can we declare functions
+ as <code>constexpr</code>, <code>virtual</code>, and pure?</p>
+</discussion>
+
+<resolution>
+ <p>The <code>virtual</code> specifier doesn't make sense for
+ associated functions (especially now that one can adapt the syntax
+ of member functions a concept map), so it should be
+ banned. Syntactically, a <i>pure-specifier</i> cannot occur in an
+ associated function, so it need not be mentioned. Suggested
+ change to [concept.fct]p2:</p>
+
+ <blockquote>
+ An <i>associated-function</i> shall declare a function or function
+ template. If the <i>declarator-id</i> of the declaration is
+ a <i>qualified-id</i>, its <i>nested-name-specifier</i> shall name
+ a template parameter of the enclosing concept; the declaration
+ declares a member function or member function template. An
+ associated function shall not
+ be <code>extern</code>([dcl.stc]), <del><code>inline</code></del>
+ <ins>have any <i>function-specifier</i></ins>
+ ([dcl.fct.spec]), <ins>be</ins> explicitly-defaulted or deleted ([dcl.fct.def]),
+ or <ins>be</ins> a friend function ([class.friend]). An associated function
+ shall not contain an <i>exception-specification</i>
+ ([except.spec]).
+ </blockquote>
+</resolution>
+</issue>

Modified: sandbox/committee/concepts/issues/section.data
==============================================================================
--- sandbox/committee/concepts/issues/section.data (original)
+++ sandbox/committee/concepts/issues/section.data 2008-05-28 16:20:36 EDT (Wed, 28 May 2008)
@@ -313,6 +313,12 @@
             14.8.2.4 [temp.deduct.partial]
             14.8.2.5 [temp.deduct.type]
         14.8.3 [temp.over]
+ 14.9 [concept]
+ 14.9.1 [concept.def]
+ 14.9.1.1 [concept.fct]
+ 14.9.1.2 [concept.assoc]
+ 14.9.1.3 [concept.req]
+ 14.9.1.4 [concept.axiom]
 15 [except]
     15.1 [except.throw]
     15.2 [except.ctor]


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