Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82815 - trunk/libs/container/test
From: igaztanaga_at_[hidden]
Date: 2013-02-11 06:32:01


Author: igaztanaga
Date: 2013-02-11 06:31:59 EST (Mon, 11 Feb 2013)
New Revision: 82815
URL: http://svn.boost.org/trac/boost/changeset/82815

Log:
Use explicit instantiation for iterators defined outside the class in order to detect compilation errors.
Text files modified:
   trunk/libs/container/test/flat_tree_test.cpp | 3 +++
   trunk/libs/container/test/list_test.cpp | 9 +++++++++
   trunk/libs/container/test/slist_test.cpp | 10 ++++++++++
   trunk/libs/container/test/stable_vector_test.cpp | 7 +++++++
   trunk/libs/container/test/vector_test.cpp | 7 +++++++
   5 files changed, 36 insertions(+), 0 deletions(-)

Modified: trunk/libs/container/test/flat_tree_test.cpp
==============================================================================
--- trunk/libs/container/test/flat_tree_test.cpp (original)
+++ trunk/libs/container/test/flat_tree_test.cpp 2013-02-11 06:31:59 EST (Mon, 11 Feb 2013)
@@ -116,6 +116,9 @@
    , std::allocator<test::movable_and_copyable_int>
>;
 
+//As flat container iterators are typedefs for vector::[const_]iterator,
+//no need to explicit instantiate them
+
 }} //boost::container
 
 

Modified: trunk/libs/container/test/list_test.cpp
==============================================================================
--- trunk/libs/container/test/list_test.cpp (original)
+++ trunk/libs/container/test/list_test.cpp 2013-02-11 06:31:59 EST (Mon, 11 Feb 2013)
@@ -32,6 +32,15 @@
 template class boost::container::list<test::movable_and_copyable_int,
    std::allocator<test::movable_and_copyable_int> >;
 
+namespace container_detail {
+
+template class list_const_iterator
+ <int, intrusive_list_type< std::allocator<int> >::container_type::iterator >;
+template class list_iterator
+ <int, intrusive_list_type< std::allocator<int> >::container_type::iterator>;
+
+}
+
 }}
 
 typedef list<int> MyList;

Modified: trunk/libs/container/test/slist_test.cpp
==============================================================================
--- trunk/libs/container/test/slist_test.cpp (original)
+++ trunk/libs/container/test/slist_test.cpp 2013-02-11 06:31:59 EST (Mon, 11 Feb 2013)
@@ -30,6 +30,16 @@
 
 template class boost::container::slist<test::movable_and_copyable_int,
    std::allocator<test::movable_and_copyable_int> >;
+
+namespace container_detail {
+
+template class slist_const_iterator
+ <int, intrusive_slist_type< std::allocator<int> >::container_type::iterator >;
+template class slist_iterator
+ <int, intrusive_slist_type< std::allocator<int> >::container_type::iterator>;
+
+}
+
 }}
 
 typedef slist<int> MyList;

Modified: trunk/libs/container/test/stable_vector_test.cpp
==============================================================================
--- trunk/libs/container/test/stable_vector_test.cpp (original)
+++ trunk/libs/container/test/stable_vector_test.cpp 2013-02-11 06:31:59 EST (Mon, 11 Feb 2013)
@@ -39,6 +39,13 @@
 template class stable_vector<test::movable_and_copyable_int,
    std::allocator<test::movable_and_copyable_int> >;
 
+namespace stable_vector_detail{
+
+template class iterator< int, int &, int *>;
+template class iterator< int, const int &, const int *>;
+
+}
+
 }}
 
 class recursive_vector

Modified: trunk/libs/container/test/vector_test.cpp
==============================================================================
--- trunk/libs/container/test/vector_test.cpp (original)
+++ trunk/libs/container/test/vector_test.cpp 2013-02-11 06:31:59 EST (Mon, 11 Feb 2013)
@@ -39,6 +39,13 @@
 template class boost::container::vector<test::movable_and_copyable_int,
    std::allocator<test::movable_and_copyable_int> >;
 
+namespace container_detail {
+
+template class vector_const_iterator<int*>;
+template class vector_iterator<int*>;
+
+}
+
 }}
 
 int test_expand_bwd()


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