Ignore:
Timestamp:
Oct 30, 2020, 12:36:16 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
0ab3b73, 36d0a80
Parents:
b9537e6 (diff), 4ae78c1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/proposals/vtable.md

    rb9537e6 rf7e4f8e8  
    512512possibly like the one used to create the assertion.
    513513
     514### Extension: Associated Types Use
     515If the `associated_types.md` proposal is accepted the following trait could
     516be added:
     517
     518    trait is_virtual(dtype T) {
     519        dtype table;
     520        // An example assertion:
     521        const table & get_virtual_table(T &);
     522    }
     523
     524There may be more assertions but there has to be at least one way to find
     525the (possibly default) virtual table. It is required to construct instances
     526of the type.
     527
     528Without the assotiated type it would look like this:
     529
     530    trait is_virtual(dtype T, dtype table) {
     531        const table & get_virtual_table(T &);
     532    }
     533
     534Which is just a little bit longer to use but becomes more problematic if the
     535user has to explicately provide the table's name as it doesn't really have its
     536own type name. If it does it is probably mangled.
     537
    514538### Virtual Tables as Types
    515539Here we consider encoding plus the implementation of functions on it to be a
Note: See TracChangeset for help on using the changeset viewer.