6 #include <boost/foreach.hpp> 
   22   for (
int i=0; i<8; ++i)
 
   24     const Offset king_square = normal[i];
 
   25     for (
int j=0; j<8; ++j)
 
   30       const int dx = king_square.
dx() - target.
dx();
 
   31       const int dy = king_square.
dy() - target.
dy();
 
   36         reverse[i].push_back(j);
 
   41   for (
int i=0; i<256; ++i)
 
   48       BOOST_FOREACH(
int p, reverse[j])
 
   50         if (! reverse_all[i].isMember(p))
 
   51           reverse_all[i].push_back(p);
 
   57 template <osl::Player Attack>
 
   59 #if (defined __GNUC__) && (! defined GPSONE) && (! defined GPSUSIONE) 
   68   for (
int i=0; i<8; ++i)
 
   70     testSquare<Attack>(state, king_square+table.normal[i], i, flags);
 
   73   BOOST_FOREACH(
int i, table.reverse_all[flags])
 
   75     const Square candidate = king_square + table.normal[i];
 
   76     if (! state.pieceAt(candidate).isEdge()
 
   77         && state.countEffect(
alt(Attack), candidate) == 1) {
 
   78       out.push_back(candidate);
 
   90   unsigned int flags = flags8;
 
   93     const Square candidate = king_square + table.normal[i];
 
   94     out.push_back(candidate);
 
  104     return find<BLACK>(state, king_square, 
out);
 
  106     return find<WHITE>(state, king_square, 
out);