[boost][range] - removed warnings found building with clang 3.2.

[SVN r85698]
This commit is contained in:
Neil Groves
2013-09-16 11:21:36 +00:00
parent 2285f909f6
commit 30e6df5a15
7 changed files with 14 additions and 5 deletions

View File

@ -76,14 +76,14 @@ namespace boost
struct range_size : struct range_size :
detail::range_size<T> detail::range_size<T>
{ {
BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<T>)); BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<T>))
}; };
template< class T > template< class T >
struct range_size<const T > struct range_size<const T >
: detail::range_size<T> : detail::range_size<T>
{ {
BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<T>)); BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<T>))
}; };
} // namespace boost } // namespace boost

View File

@ -132,6 +132,7 @@ namespace boost
typedef boost::strided_range<Container> strided_range_t; typedef boost::strided_range<Container> strided_range_t;
strided_range_t rng( boost::adaptors::stride(c, 0) ); strided_range_t rng( boost::adaptors::stride(c, 0) );
boost::ignore_unused_variable_warning(rng);
typedef BOOST_DEDUCED_TYPENAME boost::range_iterator<strided_range_t>::type iter_t; typedef BOOST_DEDUCED_TYPENAME boost::range_iterator<strided_range_t>::type iter_t;
iter_t first(boost::begin(c), boost::begin(c), boost::end(c), 0); iter_t first(boost::begin(c), boost::begin(c), boost::end(c), 0);

View File

@ -43,7 +43,7 @@ namespace boost
source.begin(), source.end() source.begin(), source.end()
); );
it == boost::copy(boost::make_iterator_range(source), target.begin()); it = boost::copy(boost::make_iterator_range(source), target.begin());
BOOST_CHECK( it == target.end() ); BOOST_CHECK( it == target.end() );

View File

@ -72,6 +72,8 @@ namespace boost_range_test_algorithm_stable_partition
result_t result2 = boost::stable_partition<return_type>( result_t result2 = boost::stable_partition<return_type>(
boost::make_iterator_range(cont2), policy.pred()); boost::make_iterator_range(cont2), policy.pred());
boost::ignore_unused_variable_warning(result2);
BOOST_CHECK_EQUAL_COLLECTIONS( cont2.begin(), cont2.end(), BOOST_CHECK_EQUAL_COLLECTIONS( cont2.begin(), cont2.end(),
cont.begin(), cont.end() ); cont.begin(), cont.end() );

View File

@ -42,6 +42,8 @@ namespace boost
iterator_t reference_it iterator_t reference_it
= std::transform(cont.begin(), cont.end(), reference.begin(), fn); = std::transform(cont.begin(), cont.end(), reference.begin(), fn);
boost::ignore_unused_variable_warning(reference_it);
iterator_t test_it iterator_t test_it
= boost::transform(cont, target.begin(), fn); = boost::transform(cont, target.begin(), fn);
@ -102,6 +104,8 @@ namespace boost
= std::transform(cont1.begin(), cont1.end(), = std::transform(cont1.begin(), cont1.end(),
cont2.begin(), reference.begin(), fn); cont2.begin(), reference.begin(), fn);
boost::ignore_unused_variable_warning(reference_it);
iterator_t test_it iterator_t test_it
= boost::transform(cont1, cont2, target.begin(), fn); = boost::transform(cont1, cont2, target.begin(), fn);

View File

@ -10,6 +10,7 @@
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
#include <boost/type_traits.hpp> #include <boost/type_traits.hpp>
#include <boost/concept_check.hpp>
#include <boost/config.hpp> #include <boost/config.hpp>
enum Container {}; enum Container {};
@ -51,6 +52,7 @@ void compat1()
{ {
std::vector<int> v; std::vector<int> v;
iterator_of< std::vector<int> >::type i = v.begin(); iterator_of< std::vector<int> >::type i = v.begin();
boost::ignore_unused_variable_warning(i);
} }
#include <boost/test/included/unit_test.hpp> #include <boost/test/included/unit_test.hpp>

View File

@ -184,8 +184,8 @@ namespace boost_range_extension_size_test
BOOST_STATIC_ASSERT(( BOOST_STATIC_ASSERT((
boost::is_same< boost::is_same<
typename boost::make_unsigned<std::ptrdiff_t>::type, boost::make_unsigned<std::ptrdiff_t>::type,
typename boost::range_size< boost::range_size<
boost_range_extension_size_test::FooWithoutSize>::type boost_range_extension_size_test::FooWithoutSize>::type
>::value >::value
)); ));