Removed BOOST_CLASS_REQUIRE macros + added file description.
1.1 --- a/lemon/concept_check.h Tue Jan 08 20:29:41 2008 +0100
1.2 +++ b/lemon/concept_check.h Wed Jan 09 00:37:22 2008 +0100
1.3 @@ -33,8 +33,14 @@
1.4
1.5 // See http://www.boost.org/libs/concept_check for documentation.
1.6
1.7 -#ifndef LEMON_CONCEPT_CHECKS_H
1.8 -#define LEMON_CONCEPT_CHECKS_H
1.9 +///\file
1.10 +///\brief Basic utilities for concept checking.
1.11 +///
1.12 +///\todo Are we still using BOOST concept checking utility?
1.13 +///Is the BOOST copyright notice necessary?
1.14 +
1.15 +#ifndef LEMON_CONCEPT_CHECK_H
1.16 +#define LEMON_CONCEPT_CHECK_H
1.17
1.18 namespace lemon {
1.19
1.20 @@ -46,6 +52,7 @@
1.21
1.22 template <class T> inline void ignore_unused_variable_warning(const T&) { }
1.23
1.24 + ///\e
1.25 template <class Concept>
1.26 inline void function_requires()
1.27 {
1.28 @@ -55,6 +62,7 @@
1.29 #endif
1.30 }
1.31
1.32 + ///\e
1.33 template <typename Concept, typename Type>
1.34 inline void checkConcept() {
1.35 #if !defined(NDEBUG)
1.36 @@ -64,42 +72,6 @@
1.37 #endif
1.38 }
1.39
1.40 -#define BOOST_CLASS_REQUIRE(type_var, ns, concept) \
1.41 - typedef void (ns::concept <type_var>::* func##type_var##concept)(); \
1.42 - template <func##type_var##concept Tp1_> \
1.43 - struct concept_checking_##type_var##concept { }; \
1.44 - typedef concept_checking_##type_var##concept< \
1.45 - BOOST_FPTR ns::concept<type_var>::constraints> \
1.46 - concept_checking_typedef_##type_var##concept
1.47 -
1.48 -#define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \
1.49 - typedef void (ns::concept <type_var1,type_var2>::* \
1.50 - func##type_var1##type_var2##concept)(); \
1.51 - template <func##type_var1##type_var2##concept Tp1_> \
1.52 - struct concept_checking_##type_var1##type_var2##concept { }; \
1.53 - typedef concept_checking_##type_var1##type_var2##concept< \
1.54 - BOOST_FPTR ns::concept<type_var1,type_var2>::constraints> \
1.55 - concept_checking_typedef_##type_var1##type_var2##concept
1.56 -
1.57 -#define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \
1.58 - typedef void (ns::concept <tv1,tv2,tv3>::* \
1.59 - func##tv1##tv2##tv3##concept)(); \
1.60 - template <func##tv1##tv2##tv3##concept Tp1_> \
1.61 - struct concept_checking_##tv1##tv2##tv3##concept { }; \
1.62 - typedef concept_checking_##tv1##tv2##tv3##concept< \
1.63 - BOOST_FPTR ns::concept<tv1,tv2,tv3>::constraints> \
1.64 - concept_checking_typedef_##tv1##tv2##tv3##concept
1.65 -
1.66 -#define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \
1.67 - typedef void (ns::concept <tv1,tv2,tv3,tv4>::* \
1.68 - func##tv1##tv2##tv3##tv4##concept)(); \
1.69 - template <func##tv1##tv2##tv3##tv4##concept Tp1_> \
1.70 - struct concept_checking_##tv1##tv2##tv3##tv4##concept { }; \
1.71 - typedef concept_checking_##tv1##tv2##tv3##tv4##concept< \
1.72 - BOOST_FPTR ns::concept<tv1,tv2,tv3,tv4>::constraints> \
1.73 - concept_checking_typedef_##tv1##tv2##tv3##tv4##concept
1.74 -
1.75 -
1.76 } // namespace lemon
1.77
1.78 -#endif // LEMON_CONCEPT_CHECKS_H
1.79 +#endif // LEMON_CONCEPT_CHECK_H