CT Busy Beaver
bearophile
bearophileHUGS at lycos.com
Sun Aug 19 04:44:50 PDT 2012
Ali Çehreli:
> Took me a while! Phew... :)
>
> http://dpaste.dzfl.pl/6b362382
>
> I had lots of trouble matching the template specialization that
> I needed. And a million silly mistakes of mine. Anyway...
> Produces the same output.
It's tricky code :-) But it's a nice exercise for C++11 template
programming.
Most of your code is very similar to mine, but I can also see
many little differences, so it seems you have written your
translation from scratch.
In your code you have left the original C++11 naming conventions:
struct step(Direction d, Left, Right) {
But in D it's better to write:
struct Step(Direction d, left, right) {
In type_list_to_vector you have solved the problems in a simple
way and using a quite different way.
Thank you,
bearophile
More information about the Digitalmars-d-learn
mailing list