diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2
index 0fafdd7..bfe0908 100644
--- a/doc/Jamfile.v2
+++ b/doc/Jamfile.v2
@@ -1,3 +1,13 @@
+#// Boost.Range library
+#//
+#// Copyright Thorsten Ottosen 2003-2008. Use, modification and
+#// distribution is subject to the Boost Software License, Version
+#// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+#// http://www.boost.org/LICENSE_1_0.txt)
+#//
+#// For more information, see http://www.boost.org/libs/range/
+#//
+
use-project boost : $(BOOST_ROOT) ;
diff --git a/doc/boost_range.html b/doc/boost_range.html
index ace1901..465bd18 100644
--- a/doc/boost_range.html
+++ b/doc/boost_range.html
@@ -493,7 +493,7 @@ class=identifier>T&
@@ -745,7 +745,13 @@ class=identifier>T
- (C) Copyright Thorsten Ottosen 2003-2007
+ © Copyright Thorsten Ottosen 2008.
+
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)
- (C) Copyright Thorsten Ottosen 2003-2004
+ © Copyright Thorsten Ottosen 2008.
+
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)
- (C) Copyright Thorsten Ottosen 2003-2004
+ © Copyright Thorsten Ottosen 2008.
+
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file LICENSE_1_0.txt or copy
+ at www.boost.org/LICENSE_1_0.txt)
- (C) Copyright Thorsten Ottosen 2003-2007
+ © Copyright Thorsten Ottosen 2008.
+
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file LICENSE_1_0.txt or copy
+ at www.boost.org/LICENSE_1_0.txt)
- The library have been under way for a long time. Dietmar Kühl originally
- intended to submit an
@@ -61,7 +61,14 @@ C++ standard:
- (C) Copyright Thorsten Ottosen 2003-2006
+ © Copyright Thorsten Ottosen 2008.
+
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file LICENSE_1_0.txt or copy
+ at www.boost.org/LICENSE_1_0.txt)
as_literal()
can be used internally in string
- algorithm librararies to such that arrays of characters are
+ algorithm librararies such that arrays of characters are
handled correctly.
diff --git a/doc/example.cpp b/doc/example.cpp
index afe448f..d3dec7c 100644
--- a/doc/example.cpp
+++ b/doc/example.cpp
@@ -1,3 +1,13 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
#include
diff --git a/doc/faq.html b/doc/faq.html
index 34304ef..244df80 100755
--- a/doc/faq.html
+++ b/doc/faq.html
@@ -114,9 +114,16 @@ Cool indeed!
-
+
diff --git a/doc/headers.html b/doc/headers.html
index 69987ce..7628591 100755
--- a/doc/headers.html
+++ b/doc/headers.html
@@ -173,7 +173,14 @@
diff --git a/doc/history_ack.html b/doc/history_ack.html
index 40ee5dc..3191dd0 100755
--- a/doc/history_ack.html
+++ b/doc/history_ack.html
@@ -18,10 +18,10 @@
History and Acknowledgement
array_traits
class template which
- had most of the functionality present now, but only for arrays and standard
- containers.
+ The library was under way for a long time. Dietmar Kühl originally intended
+ to submit an array_traits
class template which had most of
+ the functionality present now, but only for arrays and standard containers.
+ I believe this was back in 2001 or 2002.
diff --git a/doc/intro.html b/doc/intro.html
index 8478d3e..9f41c72 100755
--- a/doc/intro.html
+++ b/doc/intro.html
@@ -63,8 +63,7 @@ free-standing functions so syntactic and/or semantic differences can be removed.
- Below are given a small example (the complete example can be found Below is given a small example (the complete example can be found here):
@@ -136,7 +135,14 @@ Notice that we have to
-
- (C) Copyright Thorsten Ottosen 2003-2007 + © Copyright Thorsten Ottosen 2008. +
+ ++ Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt or copy + at www.boost.org/LICENSE_1_0.txt)
diff --git a/doc/portability.html b/doc/portability.html index 20b1355..9e63978 100755 --- a/doc/portability.html +++ b/doc/portability.html @@ -35,7 +35,7 @@ href="http://boost.sourceforge.net/regression-logs/developer/range.html">hereNotice also that some compilers cannot do function template ordering properly. - In that case one must rely of
-range_iterator
and a single function definition instead of overloaded versions for const and non-const arguments. @@ -73,11 +73,18 @@ href="http://boost.sourceforge.net/regression-logs/developer/range.html">here
+
- (C) Copyright Thorsten Ottosen 2003-2004 + © Copyright Thorsten Ottosen 2008.
++ Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt or copy + at www.boost.org/LICENSE_1_0.txt) +
> +
diff --git a/doc/range.html b/doc/range.html index dfe9345..b140888 100755 --- a/doc/range.html +++ b/doc/range.html @@ -352,34 +352,16 @@ href="../../iterator/doc/new-iter-concepts.html#random-access-traversal-iterator
++ © Copyright Thorsten Ottosen 2008. +
- - --
- +- -Copyright © 2000 -Jeremy Siek - - Copyright © 2004-2007 -Thorsten Ottosen. - + Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt or copy + at www.boost.org/LICENSE_1_0.txt) +
diff --git a/doc/style.css b/doc/style.css index 1890b52..ce44c30 100755 --- a/doc/style.css +++ b/doc/style.css @@ -1,3 +1,14 @@ +/* +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2008. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +*/ pre{ BORDER-RIGHT: gray 1pt solid; PADDING-RIGHT: 2pt; diff --git a/doc/style.html b/doc/style.html index 9a5617e..cd82c94 100755 --- a/doc/style.html +++ b/doc/style.html @@ -104,9 +104,15 @@
- (C) Copyright Thorsten Ottosen 2003-2004 + © Copyright Thorsten Ottosen 2008.
++ Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt or copy + at www.boost.org/LICENSE_1_0.txt) +
diff --git a/doc/utility_class.html b/doc/utility_class.html index f7b5535..ea51503 100644 --- a/doc/utility_class.html +++ b/doc/utility_class.html @@ -33,11 +33,12 @@ - Theiterator_range
class is templated on an - Forward + Theiterator_range
class is templated on a Forward Traversal Iterator and should be used whenever fairly general code is needed. - Thesub_range
class is templated on an Forward - Range and it is less general, but a bit easier to use since its template + Thesub_range
class is templated on a Forward Range and it is less general, + but a bit easier to use since its template argument is easier to specify. The biggest difference is, however, that asub_range
can propagate constness because it knows what a correspondingconst_iterator
is. @@ -349,10 +350,17 @@ store the result
-- (C) Copyright Thorsten Ottosen 2003-2007 -
+
++ © Copyright Thorsten Ottosen 2008. +
+ ++ Distributed under the Boost Software License, Version 1.0. (See + accompanying file LICENSE_1_0.txt or copy + at www.boost.org/LICENSE_1_0.txt) +
diff --git a/include/boost/range/as_literal.hpp b/include/boost/range/as_literal.hpp index 72f0eb5..b0d7593 100755 --- a/include/boost/range/as_literal.hpp +++ b/include/boost/range/as_literal.hpp @@ -15,7 +15,7 @@ # pragma once #endif -#if BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING #include#else @@ -116,14 +116,14 @@ namespace boost template< class Char, std::size_t sz > - inline iterator_range as_literal( const Char (&arr)[sz] ) + inline iterator_range as_literal( const Char (&arr)[sz] ) { #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590)) && __BORLANDC__ >= 0x590 return boost::make_iterator_range ( arr, arr + sz - 1 ); #else return boost::make_iterator_range( arr, arr + sz - 1 ); #endif - } + } } #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING diff --git a/include/boost/range/detail/implementation_help.hpp b/include/boost/range/detail/implementation_help.hpp index da086f0..ca12fa4 100755 --- a/include/boost/range/detail/implementation_help.hpp +++ b/include/boost/range/detail/implementation_help.hpp @@ -25,6 +25,8 @@ namespace boost { namespace range_detail { + template + inline void boost_range_silence_warning( const T& ) { } ///////////////////////////////////////////////////////////////////// // end() help @@ -82,12 +84,14 @@ namespace boost template< class T, std::size_t sz > inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] ) { + boost_range_silence_warning( boost_range_array ); return sz; } template< class T, std::size_t sz > inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] ) { + boost_range_silence_warning( boost_range_array ); return sz; } diff --git a/include/boost/range/iterator_range.hpp b/include/boost/range/iterator_range.hpp index 31b8ea8..6a85a45 100755 --- a/include/boost/range/iterator_range.hpp +++ b/include/boost/range/iterator_range.hpp @@ -11,8 +11,15 @@ #ifndef BOOST_RANGE_ITERATOR_RANGE_HPP #define BOOST_RANGE_ITERATOR_RANGE_HPP -// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch. #include // Define __STL_CONFIG_H, if appropriate. +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) + #pragma warning( push ) + #pragma warning( disable : 4996 ) +#endif + +// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch. #ifndef BOOST_OLD_IOSTREAMS # if defined(__STL_CONFIG_H) && \ !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \ @@ -21,12 +28,13 @@ # endif #endif // #ifndef BOOST_OLD_IOSTREAMS -#include +#include +#include +#include #include #include #include -#include -#include +#include #include #include #ifndef _STLP_NO_IOSTREAMS @@ -38,10 +46,6 @@ #endif // _STLP_NO_IOSTREAMS #include -#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400) - #pragma warning( disable : 4996 ) -#endif - /*! \file Defines the \c iterator_class and related functions. \c iterator_range is a simple wrapper of iterator pair idiom. It provides @@ -163,6 +167,12 @@ namespace boost //! iterator type typedef IteratorT iterator; + private: // for return value of operator()() + typedef BOOST_DEDUCED_TYPENAME + boost::mpl::if_< boost::is_abstract , + reference, value_type >::type abstract_value_type; + + public: iterator_range() : m_Begin( iterator() ), m_End( iterator() ) #ifndef NDEBUG , singular( true ) @@ -350,8 +360,8 @@ namespace boost // When storing transform iterators, operator[]() // fails because it returns by reference. Therefore // operator()() is provided for these cases. - // - value_type operator()( difference_type at ) const + // + abstract_value_type operator()( difference_type at ) const { BOOST_ASSERT( at >= 0 && at < size() ); return m_Begin[at]; @@ -639,5 +649,9 @@ namespace boost #undef BOOST_OLD_IOSTREAMS +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) + #pragma warning( pop ) +#endif + #endif diff --git a/include/boost/range/sub_range.hpp b/include/boost/range/sub_range.hpp index 35dfb27..d033b14 100755 --- a/include/boost/range/sub_range.hpp +++ b/include/boost/range/sub_range.hpp @@ -11,12 +11,12 @@ #ifndef BOOST_RANGE_SUB_RANGE_HPP #define BOOST_RANGE_SUB_RANGE_HPP -#include - -#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400) +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) + #pragma warning( push ) #pragma warning( disable : 4996 ) #endif +#include #include #include #include @@ -46,7 +46,7 @@ namespace boost sub_range() : base() { } -#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || BOOST_WORKAROUND(BOOST_MSVC, == 1400) +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) ) sub_range( const sub_range& r ) : base( static_cast ( r ) ) { } @@ -163,5 +163,9 @@ namespace boost } // namespace 'boost' +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) + #pragma warning( pop ) +#endif + #endif diff --git a/test/TODO b/test/TODO deleted file mode 100644 index 8b13789..0000000 --- a/test/TODO +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/compat1.cpp b/test/compat1.cpp deleted file mode 100755 index e69de29..0000000 diff --git a/test/partial_workaround.cpp b/test/partial_workaround.cpp index 8ac6f66..76d902f 100755 --- a/test/partial_workaround.cpp +++ b/test/partial_workaround.cpp @@ -10,6 +10,8 @@ #include #include +#include +#include #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // supress warning in Boost.Test @@ -30,7 +32,6 @@ #include #include -#include #include #include @@ -91,6 +92,11 @@ void check_partial_workaround() void check_partial_workaround() { + // + // test if warnings are generated + // + std::size_t s = boost::range_detail::array_size( "foo" ); + BOOST_CHECK_EQUAL( s, 4u ); } #endif