Hacker News new | ask | show | jobs
by mk_chan 327 days ago
I’ve been using hacks to do this for a long time. I wish it was simpler in C++. I love C++ typing but hate the syntax and defaults. It’s so complicated to get started with.

https://github.com/Mk-Chan/libchess/blob/master/internal/Met... https://github.com/Mk-Chan/libchess/blob/master/Square.h

1 comments

But it can be a bit easier! You could make Square itself an enum class and overload the operators for it directly.