On Tue, Mar 5, 2013 at 11:13 PM, ListMember <listmem...@letterboxes.org> wrote:
> This brings me to wonder if it would be possible to pass some constant (or
> set of constants, or something similar) to generic routine such that
> this/these option(s) would be treated as compiles options within the
> implementation of the generic routine.

Ugh, that is definitely not the right solution.
Some alternatives:
1) Make sure "is" and "as" work with generic types --
  maybe they already are?
2) Since currently the specialization has to be named anyway,
  write non-generic versions for "inconvenient" types,
  and use inheritance to factor out common code.
3) Implement partial specialization, in C++ style --
  fundamental solution, but perhaps an overkill
  in the light of the above.

--
Alexander S. Klenin
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to