On Monday, 21 May 2018 at 00:13:26 UTC, Ethan wrote:
Code for context: https://github.com/GooberMan/binderoo/blob/master/binderoo_client/d/src/binderoo/util/enumoptions.d

This looks good. One small caveat:

alias DocumentType = SomeDocument!(ObjectVersion._1_0, ObjectEncoding.UTF8); alias DocumentType2 = SomeDocument!(ObjectEncoding.UTF8, ObjectVersion._1_0);

These are not the same type; they're two identical types with different mangles. You can fix that with a layer of indirection:

template SomeDocument(Options...)
{
alias SomeDocument = SomeDocumentImpl!(OptionsOf!(DocumentParams, Options));
}

Reply via email to