Ignore:
Timestamp:
Jun 30, 2017, 5:45:49 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
05385a6
Parents:
435e75f
Message:

correct spelling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/proposals/references.md

    r435e75f ra4b3525  
    1717derived rvalue types such as pointer types may include qualifiers;
    1818`const int *` is a distinct type from `int *`, though the latter is safely
    19 convertable to the former.
     19convertible to the former.
    2020In general, any number of qualifiers can be safely added to the
    2121pointed-to-type of a pointer type, e.g. `int *` converts safely to
     
    2323`const volatile int *`.
    2424
    25 Since lvalues are precicely "addressable objects", in C, only lvalues can be
     25Since lvalues are precisely "addressable objects", in C, only lvalues can be
    2626used as the operand of the `&` address-of operator.
    2727Similarly, only modifiable lvalues may be used as the assigned-to
     
    147147call "lvalue of type `T`" as `T&`.
    148148There's also an obvious argument that lvalues of a (possibly-qualified) type
    149 `T` should be convertable to references of type `T`, where `T` is also
     149`T` should be convertible to references of type `T`, where `T` is also
    150150so-qualified (e.g. lvalue `int` to `int&`, lvalue `const char` to
    151151`const char&`).
    152152By similar arguments to pointer types, qualifiers should be addable to the
    153153referred-to type of a reference (e.g. `int&` to `const int&`).
    154 As a note, since pointer arithmetic is explictly not defined on `T&`,
     154As a note, since pointer arithmetic is explicitly not defined on `T&`,
    155155`restrict T&` should be allowable and would have alias-analysis rules that
    156156are actually comprehensible to mere mortals.
Note: See TracChangeset for help on using the changeset viewer.