Changes in doc/proposals/vtable.md [936d95c:fbfd97bd]
- File:
-
- 1 edited
-
doc/proposals/vtable.md (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
doc/proposals/vtable.md
r936d95c rfbfd97bd 512 512 possibly like the one used to create the assertion. 513 513 514 ### Extension: Associated Types Use515 If the `associated_types.md` proposal is accepted the following trait could516 be added:517 518 trait is_virtual(dtype T) {519 dtype table;520 // An example assertion:521 const table & get_virtual_table(T &);522 }523 524 There may be more assertions but there has to be at least one way to find525 the (possibly default) virtual table. It is required to construct instances526 of the type.527 528 Without 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 534 Which is just a little bit longer to use but becomes more problematic if the535 user has to explicately provide the table's name as it doesn't really have its536 own type name. If it does it is probably mangled.537 538 514 ### Virtual Tables as Types 539 515 Here we consider encoding plus the implementation of functions on it to be a
Note:
See TracChangeset
for help on using the changeset viewer.