|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85309 - in trunk/libs/intrusive: example test
From: igaztanaga_at_[hidden]
Date: 2013-08-11 18:15:57
Author: igaztanaga
Date: 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013)
New Revision: 85309
URL: http://svn.boost.org/trac/boost/changeset/85309
Log:
Fixed GCC 4.8 unused typedefs warnings
Text files modified:
trunk/libs/intrusive/example/doc_avl_set.cpp | 1 -
trunk/libs/intrusive/example/doc_list.cpp | 1 -
trunk/libs/intrusive/example/doc_set.cpp | 1 -
trunk/libs/intrusive/example/doc_sg_set.cpp | 1 -
trunk/libs/intrusive/example/doc_splay_set.cpp | 1 -
trunk/libs/intrusive/example/doc_unordered_set.cpp | 1 -
trunk/libs/intrusive/test/generic_assoc_test.hpp | 2 --
trunk/libs/intrusive/test/generic_multiset_test.hpp | 1 -
trunk/libs/intrusive/test/generic_set_test.hpp | 1 -
trunk/libs/intrusive/test/test_container.hpp | 18 ++++++++++++------
10 files changed, 12 insertions(+), 16 deletions(-)
Modified: trunk/libs/intrusive/example/doc_avl_set.cpp
==============================================================================
--- trunk/libs/intrusive/example/doc_avl_set.cpp Sun Aug 11 17:36:19 2013 (r85308)
+++ trunk/libs/intrusive/example/doc_avl_set.cpp 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013) (r85309)
@@ -47,7 +47,6 @@
int main()
{
typedef std::vector<MyClass>::iterator VectIt;
- typedef std::vector<MyClass>::reverse_iterator VectRit;
//Create several MyClass objects, each one with a different value
std::vector<MyClass> values;
Modified: trunk/libs/intrusive/example/doc_list.cpp
==============================================================================
--- trunk/libs/intrusive/example/doc_list.cpp Sun Aug 11 17:36:19 2013 (r85308)
+++ trunk/libs/intrusive/example/doc_list.cpp 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013) (r85309)
@@ -39,7 +39,6 @@
int main()
{
typedef std::vector<MyClass>::iterator VectIt;
- typedef std::vector<MyClass>::reverse_iterator VectRit;
//Create several MyClass objects, each one with a different value
std::vector<MyClass> values;
Modified: trunk/libs/intrusive/example/doc_set.cpp
==============================================================================
--- trunk/libs/intrusive/example/doc_set.cpp Sun Aug 11 17:36:19 2013 (r85308)
+++ trunk/libs/intrusive/example/doc_set.cpp 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013) (r85309)
@@ -47,7 +47,6 @@
int main()
{
typedef std::vector<MyClass>::iterator VectIt;
- typedef std::vector<MyClass>::reverse_iterator VectRit;
//Create several MyClass objects, each one with a different value
std::vector<MyClass> values;
Modified: trunk/libs/intrusive/example/doc_sg_set.cpp
==============================================================================
--- trunk/libs/intrusive/example/doc_sg_set.cpp Sun Aug 11 17:36:19 2013 (r85308)
+++ trunk/libs/intrusive/example/doc_sg_set.cpp 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013) (r85309)
@@ -48,7 +48,6 @@
int main()
{
typedef std::vector<MyClass>::iterator VectIt;
- typedef std::vector<MyClass>::reverse_iterator VectRit;
//Create several MyClass objects, each one with a different value
std::vector<MyClass> values;
Modified: trunk/libs/intrusive/example/doc_splay_set.cpp
==============================================================================
--- trunk/libs/intrusive/example/doc_splay_set.cpp Sun Aug 11 17:36:19 2013 (r85308)
+++ trunk/libs/intrusive/example/doc_splay_set.cpp 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013) (r85309)
@@ -53,7 +53,6 @@
int main()
{
typedef std::vector<MyClass>::iterator VectIt;
- typedef std::vector<MyClass>::reverse_iterator VectRit;
//Create several MyClass objects, each one with a different value
std::vector<MyClass> values;
Modified: trunk/libs/intrusive/example/doc_unordered_set.cpp
==============================================================================
--- trunk/libs/intrusive/example/doc_unordered_set.cpp Sun Aug 11 17:36:19 2013 (r85308)
+++ trunk/libs/intrusive/example/doc_unordered_set.cpp 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013) (r85309)
@@ -46,7 +46,6 @@
int main()
{
typedef std::vector<MyClass>::iterator VectIt;
- typedef std::vector<MyClass>::reverse_iterator VectRit;
//Create a vector with 100 different MyClass objects
std::vector<MyClass> values;
Modified: trunk/libs/intrusive/test/generic_assoc_test.hpp
==============================================================================
--- trunk/libs/intrusive/test/generic_assoc_test.hpp Sun Aug 11 17:36:19 2013 (r85308)
+++ trunk/libs/intrusive/test/generic_assoc_test.hpp 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013) (r85309)
@@ -184,7 +184,6 @@
template<class ValueTraits, template <class = void, class = void, class = void, class = void> class ContainerDefiner>
void test_generic_assoc<ValueTraits, ContainerDefiner>::test_all(std::vector<typename ValueTraits::value_type>& values)
{
- typedef typename ValueTraits::value_type value_type;
test_clone(values);
test_container_from_end(values);
test_splay_up(values);
@@ -356,7 +355,6 @@
, constant_time_size<value_type::constant_time_size>
>::type assoc_type;
typedef std::vector<value_type> orig_set_t;
- typedef typename orig_set_t::iterator iterator_t;
orig_set_t original_testset;
{
assoc_type testset (values.begin(), values.end());
Modified: trunk/libs/intrusive/test/generic_multiset_test.hpp
==============================================================================
--- trunk/libs/intrusive/test/generic_multiset_test.hpp Sun Aug 11 17:36:19 2013 (r85308)
+++ trunk/libs/intrusive/test/generic_multiset_test.hpp 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013) (r85309)
@@ -206,7 +206,6 @@
>::type multiset_type;
multiset_type testset (values.begin(), values.end());
typedef typename multiset_type::iterator iterator;
- typedef typename multiset_type::const_iterator const_iterator;
{
value_type cmp_val;
Modified: trunk/libs/intrusive/test/generic_set_test.hpp
==============================================================================
--- trunk/libs/intrusive/test/generic_set_test.hpp Sun Aug 11 17:36:19 2013 (r85308)
+++ trunk/libs/intrusive/test/generic_set_test.hpp 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013) (r85309)
@@ -277,7 +277,6 @@
>::type set_type;
set_type testset (values.begin(), values.end());
typedef typename set_type::iterator iterator;
- typedef typename set_type::const_iterator const_iterator;
{
value_type cmp_val;
Modified: trunk/libs/intrusive/test/test_container.hpp
==============================================================================
--- trunk/libs/intrusive/test/test_container.hpp Sun Aug 11 17:36:19 2013 (r85308)
+++ trunk/libs/intrusive/test/test_container.hpp 2013-08-11 18:15:57 EDT (Sun, 11 Aug 2013) (r85309)
@@ -27,8 +27,8 @@
static const bool value = false;
};
-template< class Container >
-void test_container( Container & c )
+template<class Container>
+struct test_container_typedefs
{
typedef typename Container::value_type value_type;
typedef typename Container::iterator iterator;
@@ -39,10 +39,17 @@
typedef typename Container::const_pointer const_pointer;
typedef typename Container::difference_type difference_type;
typedef typename Container::size_type size_type;
- typedef typename Container::difference_type difference_type;
- typedef typename Container::size_type size_type;
typedef typename Container::value_traits value_traits;
+};
+template< class Container >
+void test_container( Container & c )
+{
+ typedef typename Container::const_iterator const_iterator;
+ typedef typename Container::iterator iterator;
+ typedef typename Container::size_type size_type;
+
+ {test_container_typedefs<Container> dummy; (void)dummy;}
const size_type num_elem = c.size();
BOOST_TEST( c.empty() == (num_elem == 0) );
{
@@ -56,7 +63,7 @@
}
//Check iterator conversion
- BOOST_TEST( const_iterator(c.begin()) == c.cbegin() );
+ BOOST_TEST(const_iterator(c.begin()) == c.cbegin() );
{
const_iterator it(c.cbegin()), itend(c.cend());
size_type i;
@@ -313,7 +320,6 @@
template< class Container, class Data >
void test_associative_container(Container & c, Data & d)
{
- typedef typename Container::const_iterator const_iterator;
assert( d.size() > 2 );
c.clear();
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk