Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:37:34

0001 // Copyright 2004 The Trustees of Indiana University.
0002 
0003 // Use, modification and distribution is subject to the Boost Software
0004 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 //  Authors: Douglas Gregor
0008 //           Andrew Lumsdaine
0009 
0010 //
0011 // This file contains helps that enable concept-based overloading
0012 // within the Boost Graph Library.
0013 //
0014 #ifndef BOOST_GRAPH_OVERLOADING_HPP
0015 #define BOOST_GRAPH_OVERLOADING_HPP
0016 
0017 #include <boost/type_traits/is_base_and_derived.hpp>
0018 #include <boost/utility/enable_if.hpp>
0019 
0020 namespace boost
0021 {
0022 namespace graph
0023 {
0024     namespace detail
0025     {
0026 
0027         struct no_parameter
0028         {
0029         };
0030 
0031     }
0032 }
0033 } // end namespace boost::graph::detail
0034 
0035 #ifndef BOOST_NO_SFINAE
0036 
0037 #define BOOST_GRAPH_ENABLE_IF_MODELS(Graph, Tag, Type)                    \
0038     typename enable_if_c<                                                 \
0039         (is_base_and_derived< Tag,                                        \
0040             typename graph_traits< Graph >::traversal_category >::value), \
0041         Type >::type
0042 
0043 #define BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, Tag)         \
0044     ,                                                         \
0045         BOOST_GRAPH_ENABLE_IF_MODELS(                         \
0046             Graph, Tag, ::boost::graph::detail::no_parameter) \
0047         = ::boost::graph::detail::no_parameter()
0048 
0049 #else
0050 
0051 #define BOOST_GRAPH_ENABLE_IF_MODELS(Graph, Tag, Type) Type
0052 #define BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph, Tag)
0053 
0054 #endif // no SFINAE support
0055 
0056 #endif // BOOST_GRAPH_OVERLOADING_HPP