Compare commits

..

11 Commits

Author SHA1 Message Date
1218a75c58 Release
[SVN r43921]
2008-03-29 11:50:24 +00:00
481c2efbac Merge minor change from Trunk.
[SVN r43358]
2008-02-21 16:51:41 +00:00
3b702727b9 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41370]
2007-11-25 18:38:02 +00:00
f298ed51a9 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41369]
2007-11-25 18:07:19 +00:00
851fd2622e Starting point for releases
[SVN r39706]
2007-10-05 14:25:06 +00:00
720fb456d5 This commit was manufactured by cvs2svn to create tag
'Version_1_34_1'.

[SVN r38286]
2007-07-24 19:28:14 +00:00
2fa11699bf Added links to PDF docs.
[SVN r37653]
2007-05-09 17:20:56 +00:00
69dbf6f12d Remove obsolete Boost.Build v1 files.
[SVN r35880]
2006-11-06 17:10:46 +00:00
66dd3d2595 Added trivial docs change, based on user suggestion, and brought example code into synch.
[SVN r34874]
2006-08-11 18:14:13 +00:00
7a0a3fbf32 Added license info.
[SVN r34585]
2006-07-17 10:49:22 +00:00
c5de8ff789 This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r33417]
2006-03-21 02:26:31 +00:00

View File

@ -15,6 +15,10 @@
[last-revision $Date$]
]
This manual is also available in
[@http:svn.boost.org/svn/boost/sandbox/pdf/static_assert/release/static_assert.pdf
printer friendly PDF format].
[section:intro Overview and Tutorial]
The header `<boost/static_assert.hpp>` supplies a single macro `BOOST_STATIC_ASSERT(x)`,
@ -94,12 +98,17 @@ the user that the template is being misused.
#include <boost/type_traits.hpp>
template <class RandomAccessIterator >
RandomAccessIterator foo(RandomAccessIterator from, RandomAccessIterator to)
RandomAccessIterator foo(RandomAccessIterator from,
RandomAccessIterator to)
{
// this template can only be used with
// random access iterators...
typedef typename std::iterator_traits< RandomAccessIterator >::iterator_category cat;
BOOST_STATIC_ASSERT((boost::is_convertible<cat, const std::random_access_iterator_tag&>::value));
typedef typename std::iterator_traits<
RandomAccessIterator >::iterator_category cat;
BOOST_STATIC_ASSERT(
(boost::is_convertible<
cat,
const std::random_access_iterator_tag&>::value));
//
// detail goes here...
return from;