Compare commits

...

5 Commits

Author SHA1 Message Date
177bdd98ad This commit was manufactured by cvs2svn to create tag
'Version_1_28_0'.

[SVN r13949]
2002-05-16 13:26:18 +00:00
b54c2d3fcb This commit was manufactured by cvs2svn to create branch 'RC_1_28_0'.
[SVN r13795]
2002-05-10 04:34:27 +00:00
22bb032a79 fix typo in template parameter name
[SVN r13043]
2002-03-03 10:16:50 +00:00
f2725b11af Fixed typo
[SVN r12473]
2002-01-24 12:37:38 +00:00
3ab5f7708e Stripped tabs from source
[SVN r12351]
2002-01-19 12:38:14 +00:00
4 changed files with 16 additions and 16 deletions

View File

@ -8,8 +8,8 @@
/*
Revision history:
02 August 2000
Initial version.
02 August 2000
Initial version.
*/
#ifndef BOOST_STATIC_ASSERT_HPP

View File

@ -131,7 +131,7 @@ argument, we can achieve this using something like this:</p>
<pre>#include &lt;climits&gt;
#include &lt;boost/static_assert.hpp&gt;
Template &lt;class UnsignedInt&gt;template &lt;class UnsignedInt&gt;
template &lt;class UnsignedInt&gt;
class myclass
{
private:

View File

@ -26,11 +26,11 @@ RandomAccessIterator foo(RandomAccessIterator from, RandomAccessIterator to)
int main()
{
std::deque<int> d;
std::list<int> l;
foo(d.begin(), d.end()); // OK
//foo(l.begin(), l.end()); // error
return 0;
std::deque<int> d;
std::list<int> l;
foo(d.begin(), d.end()); // OK
//foo(l.begin(), l.end()); // error
return 0;
}

View File

@ -12,12 +12,12 @@
#include <boost/static_assert.hpp>
#include <boost/type_traits.hpp>
template <class RandonAccessIterator >
RandonAccessIterator foo(RandonAccessIterator from, RandonAccessIterator)
template <class RandomAccessIterator >
RandomAccessIterator foo(RandomAccessIterator from, RandomAccessIterator)
{
// this template can only be used with
// random access iterators...
typedef typename std::iterator_traits< RandonAccessIterator >::iterator_category cat;
typedef typename std::iterator_traits< RandomAccessIterator >::iterator_category cat;
BOOST_STATIC_ASSERT((boost::is_convertible<cat*, std::random_access_iterator_tag*>::value));
//
// detail goes here...
@ -26,11 +26,11 @@ RandonAccessIterator foo(RandonAccessIterator from, RandonAccessIterator)
int main()
{
std::deque<int> d;
std::list<int> l;
foo(d.begin(), d.end()); // OK
foo(l.begin(), l.end()); // error
return 0;
std::deque<int> d;
std::list<int> l;
foo(d.begin(), d.end()); // OK
foo(l.begin(), l.end()); // error
return 0;
}