forked from boostorg/concept_check
fixed obsolete use of class_requires
[SVN r8477]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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 <class T>
|
||||
struct vector {
|
||||
typedef typename class_requires< AssignableConcept<T> >::check req;
|
||||
BOOST_CLASS_REQUIRES(T, AssignableConcept);
|
||||
...
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user