3 ms·
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 s
by mk_chan 1y 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/MetaValueType.h https://github.com/Mk-Chan/libchess/blob/master/internal/Met...
https://github.com/Mk-Chan/libchess/blob/master/Square.h https://github.com/Mk-Chan/libchess/blob/master/Square.h
- gpderetta 1y agoBut it can be a bit easier! You could make Square itself an enum class and overload the operators for it directly.