Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57901 - in trunk/boost: graph/distributed pending
From: jewillco_at_[hidden]
Date: 2009-11-24 14:43:17


Author: jewillco
Date: 2009-11-24 14:43:16 EST (Tue, 24 Nov 2009)
New Revision: 57901
URL: http://svn.boost.org/trac/boost/changeset/57901

Log:
Removed obsolete file
Removed:
   trunk/boost/pending/ct_if.hpp
Text files modified:
   trunk/boost/graph/distributed/adjacency_list.hpp | 52 ++++++++++++++++++++--------------------
   trunk/boost/pending/property.hpp | 12 ++------
   2 files changed, 29 insertions(+), 35 deletions(-)

Modified: trunk/boost/graph/distributed/adjacency_list.hpp
==============================================================================
--- trunk/boost/graph/distributed/adjacency_list.hpp (original)
+++ trunk/boost/graph/distributed/adjacency_list.hpp 2009-11-24 14:43:16 EST (Tue, 24 Nov 2009)
@@ -395,9 +395,9 @@
         typedef typename Graph::directed_selector DirectedS;
 
       public:
- typedef typename ct_if<(is_same<DirectedS, bidirectionalS>::value),
- stored_in_edge<Edge>,
- Edge>::type argument_type;
+ typedef typename boost::mpl::if_<is_same<DirectedS, bidirectionalS>,
+ stored_in_edge<Edge>,
+ Edge>::type argument_type;
         typedef edge_descriptor<Edge> result_type;
 
         in_generator() : g(0) {}
@@ -580,10 +580,10 @@
                        EdgeProperty> edge_property_with_id;
 
       /// For undirected graphs, introduce the locally-owned property for edges
- typedef typename ct_if<(is_same<DirectedS, undirectedS>::value),
- property<edge_locally_owned_t, bool,
- edge_property_with_id>,
- edge_property_with_id>::type
+ typedef typename boost::mpl::if_<is_same<DirectedS, undirectedS>,
+ property<edge_locally_owned_t, bool,
+ edge_property_with_id>,
+ edge_property_with_id>::type
         base_edge_property_type;
 
       /// The edge descriptor type for the local subgraph
@@ -602,10 +602,10 @@
 
       // Bidirectional graphs have an extra vertex property to store
       // the incoming edges.
- typedef typename ct_if<(is_same<DirectedS, bidirectionalS>::value),
- property<vertex_in_edges_t, in_edge_list_type,
- VertexProperty>,
- VertexProperty>::type
+ typedef typename boost::mpl::if_<is_same<DirectedS, bidirectionalS>,
+ property<vertex_in_edges_t, in_edge_list_type,
+ VertexProperty>,
+ VertexProperty>::type
         base_vertex_property_type;
 
       // The type of the distributed adjacency list
@@ -1097,9 +1097,9 @@
     typedef typename base_type::vertex_descriptor local_vertex_descriptor;
     typedef typename base_type::edge_descriptor local_edge_descriptor;
 
- typedef typename boost::ct_if_t<typename DirectedS::is_bidir_t,
+ typedef typename boost::mpl::if_<typename DirectedS::is_bidir_t,
       bidirectional_tag,
- typename boost::ct_if_t<typename DirectedS::is_directed_t,
+ typename boost::mpl::if_<typename DirectedS::is_directed_t,
         directed_tag, undirected_tag
>::type
>::type directed_category;
@@ -1355,12 +1355,12 @@
      * are restricted; see the distributed adjacency_list
      * documentation.
      */
- typedef typename ct_if<
- (is_same<DirectedS, directedS>::value),
+ typedef typename boost::mpl::if_<
+ is_same<DirectedS, directedS>,
               directed_distributed_adj_list_tag,
- typename ct_if<(is_same<DirectedS, bidirectionalS>::value),
- bidirectional_distributed_adj_list_tag,
- undirected_distributed_adj_list_tag>::type>
+ typename boost::mpl::if_<is_same<DirectedS, bidirectionalS>,
+ bidirectional_distributed_adj_list_tag,
+ undirected_distributed_adj_list_tag>::type>
       ::type traversal_category;
 
     typedef typename inherited::degree_size_type degree_size_type;
@@ -1376,9 +1376,9 @@
       local_edge_list_type;
 
   private:
- typedef typename ct_if<(is_same<DirectedS, bidirectionalS>::value),
- typename in_edge_list_type::const_iterator,
- typename inherited::out_edge_iterator>::type
+ typedef typename boost::mpl::if_<is_same<DirectedS, bidirectionalS>,
+ typename in_edge_list_type::const_iterator,
+ typename inherited::out_edge_iterator>::type
       base_in_edge_iterator;
 
     typedef typename inherited::out_edge_iterator base_out_edge_iterator;
@@ -1424,11 +1424,11 @@
       adjacency_iterator;
 
     /// Iterator over the (local) edges in a graph
- typedef typename ct_if<(is_same<DirectedS, undirectedS>::value),
- undirected_edge_iterator,
- transform_iterator<out_edge_generator,
- base_edge_iterator>
- >::type
+ typedef typename boost::mpl::if_<is_same<DirectedS, undirectedS>,
+ undirected_edge_iterator,
+ transform_iterator<out_edge_generator,
+ base_edge_iterator>
+ >::type
       edge_iterator;
 
   public:

Deleted: trunk/boost/pending/ct_if.hpp
==============================================================================
--- trunk/boost/pending/ct_if.hpp 2009-11-24 14:43:16 EST (Tue, 24 Nov 2009)
+++ (empty file)
@@ -1,43 +0,0 @@
-// (C) Copyright Jeremy Siek 2000.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// This header replaces the implementation of ct_if that preceded the
-// introduction of Boost.MPL with a facade that defers to that reviewed and
-// accepted library.
-
-// Author: Ronald Garcia
-// Date: 20 October, 2006
-
-
-#ifndef BOOST_CT_IF_HPP
-#define BOOST_CT_IF_HPP
-
-
-// A stub implementation in terms of Boost.MPL
-
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/and.hpp>
-// true_type and false_type are used by applications of ct_if
-#include <boost/type_traits/integral_constant.hpp>
-
-namespace boost {
-
- template <class A, class B>
- struct ct_and : boost::mpl::and_<A,B> {};
-
- template <class A>
- struct ct_not : mpl::not_<A> {};
-
- template <bool cond, class A, class B>
- struct ct_if : mpl::if_c<cond,A,B> {};
-
- template <class cond, class A, class B>
- struct ct_if_t : mpl::if_<cond,A,B> {};
-
-} // namespace boost
-
-#endif // BOOST_CT_IF_HPP
-

Modified: trunk/boost/pending/property.hpp
==============================================================================
--- trunk/boost/pending/property.hpp (original)
+++ trunk/boost/pending/property.hpp 2009-11-24 14:43:16 EST (Tue, 24 Nov 2009)
@@ -6,7 +6,7 @@
 #ifndef BOOST_PROPERTY_HPP
 #define BOOST_PROPERTY_HPP
 
-#include <boost/pending/ct_if.hpp>
+#include <boost/mpl/bool.hpp>
 
 namespace boost {
 
@@ -47,15 +47,9 @@
   };
 
   template <class P>
- struct has_property {
- BOOST_STATIC_CONSTANT(bool, value = true);
- typedef true_type type;
- };
+ struct has_property : boost::mpl::true_ {};
   template <>
- struct has_property<no_property> {
- BOOST_STATIC_CONSTANT(bool, value = false);
- typedef false_type type;
- };
+ struct has_property<no_property> : boost::mpl::false_ {};
 
 } // namespace boost
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk