Compare commits

..

2 Commits

Author SHA1 Message Date
John Maddock
b89281496e Updated version number, modified static_assert to use BOOST_JOIN rather than it's own version
[SVN r11079]
2001-09-09 10:05:54 +00:00
nobody
9074163b1e This commit was manufactured by cvs2svn to create branch 'split-config'.
[SVN r10742]
2001-08-04 14:31:38 +00:00
6 changed files with 17 additions and 34 deletions

16
Jamfile
View File

@@ -1,16 +0,0 @@
subproject libs/static_assert ;
unit-test static_assert_test : static_assert_test.cpp
: <include>$(BOOST_ROOT) : ;
unit-test static_assert_example_1 : static_assert_example_1.cpp
: <include>$(BOOST_ROOT) : ;
unit-test static_assert_example_2 : static_assert_example_2.cpp
: <include>$(BOOST_ROOT) : ;
unit-test static_assert_example_3 : static_assert_example_3.cpp
: <include>$(BOOST_ROOT) : ;

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

@@ -10,7 +10,7 @@
#include <cwchar>
#include <boost/static_assert.hpp>
#if !defined(WCHAR_MIN)
#if defined(__BORLANDC__) && !defined(WCHAR_MIN)
#define WCHAR_MIN 0
#endif
@@ -29,4 +29,3 @@ int main()
return 0;
}

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 RandomAccessIterator >
RandomAccessIterator foo(RandomAccessIterator from, RandomAccessIterator)
template <class RandonAccessIterator >
RandonAccessIterator foo(RandonAccessIterator from, RandonAccessIterator to)
{
// this template can only be used with
// random access iterators...
typedef typename std::iterator_traits< RandomAccessIterator >::iterator_category cat;
typedef typename std::iterator_traits< RandonAccessIterator >::iterator_category cat;
BOOST_STATIC_ASSERT((boost::is_convertible<cat*, std::random_access_iterator_tag*>::value));
//
// detail goes here...
@@ -26,11 +26,11 @@ RandomAccessIterator foo(RandomAccessIterator from, RandomAccessIterator)
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;
}