$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r66351 - in sandbox/icl/boost/icl: . type_traits
From: afojgo_at_[hidden]
Date: 2010-11-02 07:59:58
Author: jofaber
Date: 2010-11-02 07:59:53 EDT (Tue, 02 Nov 2010)
New Revision: 66351
URL: http://svn.boost.org/trac/boost/changeset/66351
Log:
Decomposed predicates.hpp in single files to reduce dependencies. Added type_traits/predicate. Stable{msvc-9.0 gcc-3.4.4}
Added:
   sandbox/icl/boost/icl/type_traits/predicate.hpp   (contents, props changed)
Removed:
   sandbox/icl/boost/icl/predicates.hpp
Deleted: sandbox/icl/boost/icl/predicates.hpp
==============================================================================
--- sandbox/icl/boost/icl/predicates.hpp	2010-11-02 07:59:53 EDT (Tue, 02 Nov 2010)
+++ (empty file)
@@ -1,231 +0,0 @@
-/*-----------------------------------------------------------------------------+
-Copyright (c) 2008-2009: Joachim Faulhaber
-+------------------------------------------------------------------------------+
-Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
-+------------------------------------------------------------------------------+
-   Distributed under the Boost Software License, Version 1.0.
-      (See accompanying file LICENCE.txt or copy at
-           http://www.boost.org/LICENSE_1_0.txt)
-+-----------------------------------------------------------------------------*/
-#ifndef BOOST_ICL_PREDICATES_HPP_JOFA_990224
-#define BOOST_ICL_PREDICATES_HPP_JOFA_990224
-
-//JODO remove file
-//#include <functional>
-//#include <boost/icl/type_traits/predicate.hpp>
-//#include <boost/icl/type_traits/type_to_string.hpp>
-//
-//namespace boost{namespace icl
-//{
-//    // naming convention
-//    // predicate: n-ary predicate
-//    // property:  unary predicate
-//    // relation:  binary predicate
-//
-//
-//    // Binary predicates: relations
-//
-//    template <class Type> struct std_equal : public relation<Type,Type>
-//    {
-//        bool operator()(const Type& lhs, const Type& rhs)const
-//        {
-//            return lhs == rhs;
-//        }
-//    };
-//
-//    //-----------------------------------------------------------------------------
-//
-//    template<>         
-//    inline std::string unary_template_to_string<icl::std_equal>::apply()
-//    { return "=="; }
-//
-//    template <class Type> 
-//    struct element_equal : public relation<Type,Type>
-//    {
-//        bool operator()(const Type& lhs, const Type& rhs)const
-//        {
-//            return is_element_equal(lhs, rhs);
-//        }
-//    };
-//
-//    template<>
-//    inline std::string unary_template_to_string<icl::element_equal>::apply()  
-//    { return "="; }
-//
-//    template <class Type> 
-//    struct distinct_equal : public relation<Type,Type>
-//    {
-//        bool operator()(const Type& lhs, const Type& rhs)const
-//        {
-//            return is_distinct_equal(lhs, rhs);
-//        }
-//    };
-//
-//    template<>
-//    inline std::string unary_template_to_string<icl::distinct_equal>::apply()  
-//    { return "==/0"; }
-//
-//
-//
-//    /// Functor class template contained_in implements the subset relation.
-//    template<class Type> 
-//    struct sub_super_set : public relation<Type,Type>
-//    {
-//        /// Apply the subset relation.
-//        /** <tt>contained_in(sub, super)</tt> is true if <tt>sub</tt> 
-//            is contained in <tt>super</tt> */
-//        bool operator()(const Type& sub, const Type& super)const
-//        {
-//            return contains(super, sub);
-//        }
-//    };
-//
-//    template<>
-//    inline std::string unary_template_to_string<icl::sub_super_set>::apply()  
-//    { return "C="; }
-//
-//    /// Functor class template <b>contains</b> implements the superset relation. 
-//    template<class Type> 
-//    struct super_sub_set : public relation<Type,Type>
-//    {
-//        /// Apply the superset relation.
-//        /** <tt>contains(super, sub)</tt> is true if <tt>super</tt> containes 
-//            <tt>sub</tt> */
-//        bool operator()(const Type& super, const Type& sub)const
-//        {
-//            return contains(super, sub);
-//        }
-//    };
-//
-//    template<>
-//    inline std::string unary_template_to_string<icl::super_sub_set>::apply()  
-//    { return "D="; }
-//
-//}} // namespace icl boost
-
-<<<<<<< .mine
-=======
-namespace boost{namespace icl
-{
-    // naming convention
-    // predicate: n-ary predicate
-    // property:  unary predicate
-    // relation:  binary predicate
-
-    // Unary predicates
-
-    template <class Type>
-    class property : public std::unary_function<Type,bool>{};
-
-    template <class Type>
-    class member_property : public property<Type>
-    {
-    public:
-        member_property( bool(Type::* pred)()const ): property<Type>(), m_pred(pred){}
-        bool operator()(const Type& x)const { return (x.*m_pred)(); }
-    private:
-        bool(Type::* m_pred)()const;
-    } ;
-
-    template <class Type>
-    struct is_identity_element: public property<Type>
-    {
-        bool operator() (const Type& x)const { return x == Type(); }
-    } ;
-
-    template <class Type>
-    class content_is_identity_element: public property<Type>
-    {
-    public:
-        bool operator() (const Type& x)const 
-        { return x.second == Type::second_type(); }
-    } ;
-
-
-    // Binary predicates: relations
-
-    template <class LeftT, class RightT>
-    class relation : public std::binary_function<LeftT,RightT,bool>{};
-
-    template <class Type> struct std_equal : public relation<Type,Type>
-    {
-        bool operator()(const Type& lhs, const Type& rhs)const
-        {
-            return lhs == rhs;
-        }
-    };
-
-    //-----------------------------------------------------------------------------
-
-    template<>         
-    inline std::string unary_template_to_string<icl::std_equal>::apply()
-    { return "=="; }
-
-    template <class Type> 
-    struct element_equal : public relation<Type,Type>
-    {
-        bool operator()(const Type& lhs, const Type& rhs)const
-        {
-            return is_element_equal(lhs, rhs);
-        }
-    };
-
-    template<>
-    inline std::string unary_template_to_string<icl::element_equal>::apply()  
-    { return "="; }
-
-    template <class Type> 
-    struct distinct_equal : public relation<Type,Type>
-    {
-        bool operator()(const Type& lhs, const Type& rhs)const
-        {
-            return is_distinct_equal(lhs, rhs);
-        }
-    };
-
-    template<>
-    inline std::string unary_template_to_string<icl::distinct_equal>::apply()  
-    { return "==/0"; }
-
-
-
-    /// Functor class template contained_in implements the subset relation.
-    template<class Type> 
-    struct sub_super_set : public relation<Type,Type>
-    {
-        /// Apply the subset relation.
-        /** <tt>contained_in(sub, super)</tt> is true if <tt>sub</tt> 
-            is contained in <tt>super</tt> */
-        bool operator()(const Type& sub, const Type& super)const
-        {
-            return icl::contains(super, sub);
-        }
-    };
-
-    template<>
-    inline std::string unary_template_to_string<icl::sub_super_set>::apply()  
-    { return "C="; }
-
-    /// Functor class template <b>contains</b> implements the superset relation. 
-    template<class Type> 
-    struct super_sub_set : public relation<Type,Type>
-    {
-        /// Apply the superset relation.
-        /** <tt>contains(super, sub)</tt> is true if <tt>super</tt> containes 
-            <tt>sub</tt> */
-        bool operator()(const Type& super, const Type& sub)const
-        {
-            return icl::contains(super, sub);
-        }
-    };
-
-    template<>
-    inline std::string unary_template_to_string<icl::super_sub_set>::apply()  
-    { return "D="; }
-
-}} // namespace icl boost
-
->>>>>>> .r66349
-#endif
-
-
Added: sandbox/icl/boost/icl/type_traits/predicate.hpp
==============================================================================
--- (empty file)
+++ sandbox/icl/boost/icl/type_traits/predicate.hpp	2010-11-02 07:59:53 EDT (Tue, 02 Nov 2010)
@@ -0,0 +1,44 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: Joachim Faulhaber
++------------------------------------------------------------------------------+
+   Distributed under the Boost Software License, Version 1.0.
+      (See accompanying file LICENCE.txt or copy at
+           http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_TYPE_TRAITS_PREDICATE_HPP_JOFA_101102
+#define BOOST_ICL_TYPE_TRAITS_PREDICATE_HPP_JOFA_101102
+
+#include <functional>
+
+namespace boost{namespace icl
+{
+    // naming convention
+    // predicate: n-ary predicate
+    // property:  unary predicate
+    // relation:  binary predicate
+
+    // Unary predicates
+
+    template <class Type>
+    class property : public std::unary_function<Type,bool>{};
+
+    template <class Type>
+    class member_property : public property<Type>
+    {
+    public:
+        member_property( bool(Type::* pred)()const ): property<Type>(), m_pred(pred){}
+        bool operator()(const Type& x)const { return (x.*m_pred)(); }
+    private:
+        bool(Type::* m_pred)()const;
+    } ;
+
+    // Binary predicates: relations
+
+    template <class LeftT, class RightT>
+    class relation : public std::binary_function<LeftT,RightT,bool>{};
+
+
+}} // namespace icl boost
+
+#endif
+