fixed obsolete use of class_requires

[SVN r8477]
This commit is contained in:
Jeremy Siek
2000-12-19 18:12:41 +00:00
parent 2d7631ca77
commit 2b8a18ecc9
2 changed files with 4 additions and 7 deletions

View File

@@ -1,11 +1,8 @@
#include <list>
#include <algorithm>
struct foo {
bool operator<(const foo&) const { return false; }
};
int main(int, char*[]) {
std::list<foo> v;
int main() {
std::list<int> v;
std::stable_sort(v.begin(), v.end());
return 0;
}

View File

@@ -179,7 +179,7 @@ type for the map.
</pre>
As an example of using <tt>class_requires</tt> we look at a concept
As an example of using <tt>BOOST_CLASS_REQUIRES</tt> we look at a concept
check that could be added to <tt>std::vector</tt>. One requirement
that is placed on the element type is that it must be <a
href="http://www.sgi.com/Technology/STL/Assignable.html">Assignable</a>.
@@ -191,7 +191,7 @@ of the definition for <tt>std::vector</tt>.
namespace std {
template &lt;class T&gt;
struct vector {
typedef typename class_requires&lt; AssignableConcept&lt;T&gt; &gt;::check req;
BOOST_CLASS_REQUIRES(T, AssignableConcept);
...
};
}