• Kenton Varda's avatar
    Generics: Tag generated types using members rather than template specialization. · 490acec8
    Kenton Varda authored
    That is to say, whereas previously we would extend capnp::typeId<T>() to a new type by declaring a specialization of it for that type, now we instead have the type contain a nested class called _capnpPrivate which contains a `typeId` constant.
    
    This is necessary because it is impossible to specialize a template for a type which is itself nested inside a template type. E.g. it's impossible to write a specialization `template <typename T> typeId<Foo<T>::Bar>()`; C++ simply doesn't support this. But with generics, Cap'n Proto will allow types to be nested inside templates, so we need this to work.
    490acec8
Name
Last commit
Last update
c++ Loading commit data...
doc Loading commit data...
highlighting/qtcreator Loading commit data...
.gitignore Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
RELEASE-PROCESS.md Loading commit data...
mega-test-quick.cfg Loading commit data...
mega-test.cfg Loading commit data...
mega-test.py Loading commit data...
release.sh Loading commit data...
super-test.sh Loading commit data...