All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cheapPtype.h
Go to the documentation of this file.
1 /* cheapPtype.h
2  */
3 #ifndef _CHEAPPTYPE_H
4 #define _CHEAPPTYPE_H
5 
7 #include "osl/eval/pieceEval.h"
8 
9 namespace osl
10 {
11  namespace move_order
12  {
16  struct CheapPtype
17  {
18  bool operator()(Move l, Move r) const
19  {
20  const Ptype old_ptype_l = l.oldPtype();
21  const Ptype old_ptype_r = r.oldPtype();
22 
23  if (old_ptype_l != old_ptype_r)
24  return (eval::Ptype_Eval_Table.value(old_ptype_l)
25  < eval::Ptype_Eval_Table.value(old_ptype_r));
26  return Promotion()(l, r);
27  }
28  };
29  } // namespace move_order
30 } // namespace osl
31 
32 #endif /* _CHEAPPTYPE_H */
33 // ;;; Local Variables:
34 // ;;; mode:c++
35 // ;;; c-basic-offset:2
36 // ;;; End: