From 2b8a18ecc9c836122b3487c5497695c0cff9f9da Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Tue, 19 Dec 2000 18:12:41 +0000 Subject: [PATCH] fixed obsolete use of class_requires [SVN r8477] --- bad_error_eg.cpp | 7 ++----- using_concept_check.htm | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bad_error_eg.cpp b/bad_error_eg.cpp index b801f77..517d3cb 100644 --- a/bad_error_eg.cpp +++ b/bad_error_eg.cpp @@ -1,11 +1,8 @@ #include #include -struct foo { - bool operator<(const foo&) const { return false; } -}; -int main(int, char*[]) { - std::list v; +int main() { + std::list v; std::stable_sort(v.begin(), v.end()); return 0; } diff --git a/using_concept_check.htm b/using_concept_check.htm index ab247d8..ef9ea3b 100644 --- a/using_concept_check.htm +++ b/using_concept_check.htm @@ -179,7 +179,7 @@ type for the map. -As an example of using class_requires we look at a concept +As an example of using BOOST_CLASS_REQUIRES we look at a concept check that could be added to std::vector. One requirement that is placed on the element type is that it must be Assignable. @@ -191,7 +191,7 @@ of the definition for std::vector. namespace std { template <class T> struct vector { - typedef typename class_requires< AssignableConcept<T> >::check req; + BOOST_CLASS_REQUIRES(T, AssignableConcept); ... }; }