[Issue 4070] prefix const on member functions considered confusing

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 5 12:43:20 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4070


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla at digitalmars.com
         Resolution|                            |WONTFIX


--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> 2010-04-05 12:43:18 PDT ---
It's current behavior is consistent. Const without parentheses applies to the
outermost declaration. So, for:

    const foo* bar();

the const applies to the outermost part of the type, which would be the
function type, not the function return type.

The following syntactical usages of const all have the same meaning:

    const:
       foo* bar();

and:

    const {
       foo* bar();
    }

and:

    const foo* bar();

as all attributes behave the same way.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list