Index: mlc/fcmp.hh
===================================================================
--- mlc/fcmp.hh	(revision 258)
+++ mlc/fcmp.hh	(working copy)
@@ -32,36 +32,42 @@
 
 
 
-# define mlc_decl_mfun_cmp(OperatorName, OperatorSymbol)				\
-											\
-  template <typename T1, typename T2> struct OperatorName##_;				\
-											\
-  template <typename T1, typename T2>							\
-  struct set_super_type < OperatorName##_<T1,T2> >					\
-  {											\
-    typedef abstract::binary_function< OperatorName##_<T1,T2> > ret;			\
-  };											\
-											\
-  template <typename T1, typename T2>							\
-  struct set_props < category::fun, OperatorName##_<T1,T2> >				\
-  {											\
-    typedef bool res_type;								\
-    typedef T1 arg1_type;								\
-    typedef T2 arg2_type;								\
-  };											\
-											\
-  template <typename T1, typename T2>							\
-  struct OperatorName##_ : public abstract::binary_function< OperatorName##_<T1,T2> >	\
-  {											\
-    bool impl_binop(const T1& arg1, const T2& arg2) const				\
-    {											\
-      return arg1 OperatorSymbol arg2;							\
-    }											\
-  };											\
-  											\
-  typedef mfun2<OperatorName##_> f_OperatorName##_type;					\
-  static f_OperatorName##_type f_OperatorName##;					\
-											\
+# define mlc_decl_mfun_cmp(OperatorName, OperatorSymbol)					\
+												\
+  namespace fun											\
+  {												\
+    template <typename T1, typename T2> struct OperatorName##_;					\
+  }												\
+												\
+  template <typename T1, typename T2>								\
+  struct set_super_type < fun::OperatorName##_<T1,T2> >						\
+  {												\
+    typedef abstract::binary_function< fun::OperatorName##_<T1,T2> > ret;			\
+  };												\
+												\
+  template <typename T1, typename T2>								\
+  struct set_props < category::fun, fun::OperatorName##_<T1,T2> >				\
+  {												\
+    typedef bool res_type;									\
+    typedef T1 arg1_type;									\
+    typedef T2 arg2_type;									\
+  };												\
+												\
+  namespace fun											\
+  {												\
+    template <typename T1, typename T2>								\
+    struct OperatorName##_ : public mlc::abstract::binary_function< OperatorName##_<T1,T2> >	\
+    {												\
+      bool impl_binop(const T1& arg1, const T2& arg2) const					\
+      {												\
+	return arg1 OperatorSymbol arg2;							\
+      }												\
+    };												\
+  }												\
+												\
+  typedef mfun2<fun::OperatorName##_> f_##OperatorName##_type;					\
+  static f_##OperatorName##_type f_##OperatorName;						\
+												\
 struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n
 
 
Index: mlc/flogic.hh
===================================================================
--- mlc/flogic.hh	(revision 0)
+++ mlc/flogic.hh	(revision 0)
@@ -0,0 +1,91 @@
+// Copyright (C) 2005  EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library.  This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING.  If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+// MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction.  Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License.  This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef METALIC_FLOGIC_HH
+# define METALIC_FLOGIC_HH
+
+# include <mlc/afun.hh>
+
+
+
+# define mlc_decl_mfun_logic(OperatorName, OperatorBody)					\
+												\
+  namespace fun											\
+  {												\
+    template <typename T1, typename T2> struct OperatorName##_;					\
+  }												\
+												\
+  template <typename T1, typename T2>								\
+  struct set_super_type < fun::OperatorName##_<T1,T2> >						\
+  {												\
+    typedef abstract::binary_function< fun::OperatorName##_<T1,T2> > ret;			\
+  };												\
+												\
+  template <typename T1, typename T2>								\
+  struct set_props < category::fun, fun::OperatorName##_<T1,T2> >				\
+  {												\
+    typedef bool res_type;									\
+    typedef T1 arg1_type;									\
+    typedef T2 arg2_type;									\
+  };												\
+												\
+  namespace fun											\
+  {												\
+    template <typename T1, typename T2>								\
+    struct OperatorName##_ : public mlc::abstract::binary_function< OperatorName##_<T1,T2> >	\
+    {												\
+      bool impl_binop(const T1& lhs, const T2& rhs) const					\
+      {												\
+	return OperatorBody;									\
+      }												\
+    };												\
+  }												\
+												\
+  typedef mfun2<fun::OperatorName##_> f_##OperatorName##_type;					\
+  static f_##OperatorName##_type f_##OperatorName;						\
+												\
+struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n
+
+
+
+namespace mlc
+{
+
+  mlc_decl_mfun_logic(   and,       lhs and rhs  );
+  mlc_decl_mfun_logic(  nand,  not (lhs and rhs) );
+
+  mlc_decl_mfun_logic(    or,       lhs or rhs  );
+  mlc_decl_mfun_logic(   nor,  not (lhs or rhs) );
+
+  mlc_decl_mfun_logic(   xor,  (lhs and not rhs) or (not lhs and     rhs) );
+  mlc_decl_mfun_logic(  xnor,  (lhs and     rhs) or (not lhs and not rhs) );
+
+} // end of namespace mlc
+
+
+
+#endif // ! METALIC_FLOGIC_HH
Index: mlc/makefile.src
===================================================================
--- mlc/makefile.src	(revision 258)
+++ mlc/makefile.src	(working copy)
@@ -4,6 +4,7 @@
 ##
 
 MLC_DEP =					\
+  afun.hh					\
   any.hh					\
   arith.hh					\
   array/1d.hh					\
@@ -20,11 +21,14 @@
   cmp.hh					\
   config/system.hh				\
   contract.hh					\
+  fcmp.hh					\
+  flogic.hh					\
   fun.hh					\
   if.hh						\
   implies.hh					\
   is_a.hh					\
   math.hh					\
+  overload.hh					\
   properties.hh					\
   switch.hh					\
   to_string.hh					\
