eliminate unused local typedef and signed/unsigned comparison warnings.

This commit is contained in:
Neil Groves
2014-02-27 16:34:58 +00:00
parent 9b477525de
commit 502abb9884
12 changed files with 59 additions and 29 deletions

View File

@ -28,7 +28,9 @@ namespace boost
void test(Container1& cont1, Container2& cont2)
{
typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator
iterator_t BOOST_RANGE_UNUSED;
std::vector<value_t> reference_target(cont1.begin(), cont1.end());
reference_target.insert(reference_target.end(),
@ -74,7 +76,8 @@ namespace boost
void test_pred(Container1 cont1, Container2 cont2, BinaryPredicate pred)
{
typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator
iterator_t BOOST_RANGE_UNUSED;
sort_container(cont1, pred);
sort_container(cont2, pred);

View File

@ -106,8 +106,11 @@ namespace boost_range_test_algorithm_max_element
{
using namespace boost::assign;
typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container>::type container_t;
typedef BOOST_DEDUCED_TYPENAME Container::value_type
value_t BOOST_RANGE_UNUSED;
typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container>::type
container_t;
boost::range_test::range_return_test_driver test_driver;

View File

@ -104,8 +104,11 @@ namespace boost_range_test_algorithm_min_element
{
using namespace boost::assign;
typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container>::type container_t;
typedef BOOST_DEDUCED_TYPENAME Container::value_type
value_t BOOST_RANGE_UNUSED;
typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container>::type
container_t;
boost::range_test::range_return_test_driver test_driver;

View File

@ -160,15 +160,17 @@ namespace boost
MutableContainer2 cont2;
const Container2& cref_cont2 = cont2;
typedef BOOST_DEDUCED_TYPENAME Container1::iterator iterator1_t;
typedef BOOST_DEDUCED_TYPENAME Container1::const_iterator const_iterator1_t;
typedef BOOST_DEDUCED_TYPENAME Container2::iterator iterator2_t;
typedef BOOST_DEDUCED_TYPENAME Container2::const_iterator const_iterator2_t;
typedef BOOST_DEDUCED_TYPENAME Container1::iterator
iterator1_t BOOST_RANGE_UNUSED;
typedef std::pair<iterator1_t, iterator2_t> pair_mmit_t;
typedef std::pair<const_iterator1_t, iterator2_t> pair_cmit_t;
typedef std::pair<iterator1_t, const_iterator2_t> pair_mcit_t;
typedef std::pair<const_iterator1_t, const_iterator2_t> pair_ccit_t;
typedef BOOST_DEDUCED_TYPENAME Container1::const_iterator
const_iterator1_t BOOST_RANGE_UNUSED;
typedef BOOST_DEDUCED_TYPENAME Container2::iterator
iterator2_t BOOST_RANGE_UNUSED;
typedef BOOST_DEDUCED_TYPENAME Container2::const_iterator
const_iterator2_t BOOST_RANGE_UNUSED;
eval_mismatch(cont1, cont2, cont1.end(), cont2.end());
eval_mismatch(cont1, cont2, std::equal_to<int>(), cont1.end(), cont2.end());

View File

@ -90,7 +90,8 @@ namespace boost
template<class Container>
void test_random_shuffle_nogen_impl(Container& cont)
{
typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type iterator_t;
typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
iterator_t BOOST_RANGE_UNUSED;
const int MAX_RETRIES = 10000;

View File

@ -36,7 +36,8 @@ namespace
typedef typename boost::range_value<Container>::type value_type;
std::vector<value_type> reference;
typedef BOOST_DEDUCED_TYPENAME std::vector<value_type>::iterator iterator_t;
typedef BOOST_DEDUCED_TYPENAME std::vector<value_type>::iterator
iterator_t BOOST_RANGE_UNUSED;
test_append(
std::remove_copy(c.begin(), c.end(),

View File

@ -38,7 +38,8 @@ namespace
typedef typename boost::range_value<Container>::type value_type;
std::vector<value_type> reference;
typedef BOOST_DEDUCED_TYPENAME std::vector<value_type>::iterator iterator_t;
typedef BOOST_DEDUCED_TYPENAME std::vector<value_type>::iterator
iterator_t BOOST_RANGE_UNUSED;
test_append(
std::replace_copy(c.begin(), c.end(),

View File

@ -31,11 +31,14 @@ namespace
template<class Container, class Iterator>
void test_rotate_copy_impl(Container& cont, Iterator where_it)
{
typedef BOOST_DEDUCED_TYPENAME boost::range_value<Container>::type value_type;
typedef BOOST_DEDUCED_TYPENAME boost::range_value<Container>::type
value_type;
std::vector<value_type> reference;
std::vector<value_type> test;
typedef BOOST_DEDUCED_TYPENAME boost::range_iterator<Container>::type iterator_t;
typedef BOOST_DEDUCED_TYPENAME boost::range_iterator<Container>::type
iterator_t BOOST_RANGE_UNUSED;
test_append(
std::rotate_copy(cont.begin(), where_it, cont.end(),

View File

@ -60,7 +60,9 @@ namespace
Integer count, const Value& value,
BinaryPredicate pred)
{
typedef typename std::iterator_traits<ForwardIterator>::iterator_category cat_t;
typedef typename std::iterator_traits<
ForwardIterator
>::iterator_category cat_t BOOST_RANGE_UNUSED;
if (count <= 0)
return first;