COIN-OR::LEMON - Graph Library

Changeset 53:afb5325d6211 in lemon


Ignore:
Timestamp:
01/09/08 00:37:22 (17 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Removed BOOST_CLASS_REQUIRE macros + added file description.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concept_check.h

    r39 r53  
    3434// See http://www.boost.org/libs/concept_check for documentation.
    3535
    36 #ifndef LEMON_CONCEPT_CHECKS_H
    37 #define LEMON_CONCEPT_CHECKS_H
     36///\file
     37///\brief Basic utilities for concept checking.
     38///
     39///\todo Are we still using BOOST concept checking utility?
     40///Is the BOOST copyright notice necessary?
     41
     42#ifndef LEMON_CONCEPT_CHECK_H
     43#define LEMON_CONCEPT_CHECK_H
    3844
    3945namespace lemon {
     
    4753  template <class T> inline void ignore_unused_variable_warning(const T&) { }
    4854
     55  ///\e
    4956  template <class Concept>
    5057  inline void function_requires()
     
    5663  }
    5764
     65  ///\e
    5866  template <typename Concept, typename Type>
    5967  inline void checkConcept() {
     
    6573  }
    6674
    67 #define BOOST_CLASS_REQUIRE(type_var, ns, concept) \
    68   typedef void (ns::concept <type_var>::* func##type_var##concept)(); \
    69   template <func##type_var##concept Tp1_> \
    70   struct concept_checking_##type_var##concept { }; \
    71   typedef concept_checking_##type_var##concept< \
    72     BOOST_FPTR ns::concept<type_var>::constraints> \
    73     concept_checking_typedef_##type_var##concept
    74 
    75 #define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \
    76   typedef void (ns::concept <type_var1,type_var2>::* \
    77      func##type_var1##type_var2##concept)(); \
    78   template <func##type_var1##type_var2##concept Tp1_> \
    79   struct concept_checking_##type_var1##type_var2##concept { }; \
    80   typedef concept_checking_##type_var1##type_var2##concept< \
    81     BOOST_FPTR ns::concept<type_var1,type_var2>::constraints> \
    82     concept_checking_typedef_##type_var1##type_var2##concept
    83 
    84 #define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \
    85   typedef void (ns::concept <tv1,tv2,tv3>::* \
    86      func##tv1##tv2##tv3##concept)(); \
    87   template <func##tv1##tv2##tv3##concept Tp1_> \
    88   struct concept_checking_##tv1##tv2##tv3##concept { }; \
    89   typedef concept_checking_##tv1##tv2##tv3##concept< \
    90     BOOST_FPTR ns::concept<tv1,tv2,tv3>::constraints> \
    91     concept_checking_typedef_##tv1##tv2##tv3##concept
    92 
    93 #define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \
    94   typedef void (ns::concept <tv1,tv2,tv3,tv4>::* \
    95      func##tv1##tv2##tv3##tv4##concept)(); \
    96   template <func##tv1##tv2##tv3##tv4##concept Tp1_> \
    97   struct concept_checking_##tv1##tv2##tv3##tv4##concept { }; \
    98   typedef concept_checking_##tv1##tv2##tv3##tv4##concept< \
    99     BOOST_FPTR ns::concept<tv1,tv2,tv3,tv4>::constraints> \
    100     concept_checking_typedef_##tv1##tv2##tv3##tv4##concept
    101 
    102 
    10375} // namespace lemon
    10476
    105 #endif // LEMON_CONCEPT_CHECKS_H
     77#endif // LEMON_CONCEPT_CHECK_H
Note: See TracChangeset for help on using the changeset viewer.