]> git.sesse.net Git - stockfish/commit
Fix involuntary conversions of ExtMove to Move
authorMarco Costalba <mcostalba@gmail.com>
Sun, 13 Aug 2017 18:01:26 +0000 (11:01 -0700)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 17 Aug 2017 09:04:00 +0000 (02:04 -0700)
commitd482e3a8905ee194bda3f67a21dda5132c21f30b
tree0d079430bed3ba2010186ba72a753f27ee7cc08d
parent9001f55147fa304223623a6de0025ffe79f5fcc3
Fix involuntary conversions of ExtMove to Move

The trick is to create an ambiguity for the
compiler in case an unwanted conversion to
Move is attempted like in:

    ExtMove m1{Move(17),4}, m2{Move(4),17};

    std::cout << (m1 < m2) << std::endl; // 1
    std::cout << (m1 > m2) << std::endl; // 1(!)

This fixes issue #1204

No functional change.
src/movegen.h