mirror of
https://github.com/boostorg/static_assert.git
synced 2026-01-21 17:32:16 +00:00
Compare commits
2 Commits
boost-1.27
...
svn-branch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b89281496e | ||
|
|
9074163b1e |
16
Jamfile
16
Jamfile
@@ -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) : ;
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
/*
|
||||
Revision history:
|
||||
02 August 2000
|
||||
Initial version.
|
||||
02 August 2000
|
||||
Initial version.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_STATIC_ASSERT_HPP
|
||||
|
||||
@@ -131,7 +131,7 @@ argument, we can achieve this using something like this:</p>
|
||||
<pre>#include <climits>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
template <class UnsignedInt>
|
||||
Template <class UnsignedInt>template <class UnsignedInt>
|
||||
class myclass
|
||||
{
|
||||
private:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
template <class RandonAccessIterator >
|
||||
RandonAccessIterator foo(RandonAccessIterator from, RandonAccessIterator)
|
||||
RandonAccessIterator foo(RandonAccessIterator from, RandonAccessIterator to)
|
||||
{
|
||||
// this template can only be used with
|
||||
// random access iterators...
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user