From f56ec3886b6fbbc2e291df17c1845e63228a8173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 11 Feb 2013 11:31:59 +0000 Subject: [PATCH] Use explicit instantiation for iterators defined outside the class in order to detect compilation errors. [SVN r82815] --- test/flat_tree_test.cpp | 3 +++ test/list_test.cpp | 9 +++++++++ test/slist_test.cpp | 10 ++++++++++ test/stable_vector_test.cpp | 7 +++++++ test/vector_test.cpp | 7 +++++++ 5 files changed, 36 insertions(+) diff --git a/test/flat_tree_test.cpp b/test/flat_tree_test.cpp index c476b13..5854b59 100644 --- a/test/flat_tree_test.cpp +++ b/test/flat_tree_test.cpp @@ -116,6 +116,9 @@ template class flat_multiset , std::allocator >; +//As flat container iterators are typedefs for vector::[const_]iterator, +//no need to explicit instantiate them + }} //boost::container diff --git a/test/list_test.cpp b/test/list_test.cpp index 2abcdec..fca017f 100644 --- a/test/list_test.cpp +++ b/test/list_test.cpp @@ -32,6 +32,15 @@ template class boost::container::list >; +namespace container_detail { + +template class list_const_iterator + >::container_type::iterator >; +template class list_iterator + >::container_type::iterator>; + +} + }} typedef list MyList; diff --git a/test/slist_test.cpp b/test/slist_test.cpp index 46d6851..808d25c 100644 --- a/test/slist_test.cpp +++ b/test/slist_test.cpp @@ -30,6 +30,16 @@ template class boost::container::slist >; + +namespace container_detail { + +template class slist_const_iterator + >::container_type::iterator >; +template class slist_iterator + >::container_type::iterator>; + +} + }} typedef slist MyList; diff --git a/test/stable_vector_test.cpp b/test/stable_vector_test.cpp index c69efe4..748886e 100644 --- a/test/stable_vector_test.cpp +++ b/test/stable_vector_test.cpp @@ -39,6 +39,13 @@ template class stable_vector >; +namespace stable_vector_detail{ + +template class iterator< int, int &, int *>; +template class iterator< int, const int &, const int *>; + +} + }} class recursive_vector diff --git a/test/vector_test.cpp b/test/vector_test.cpp index a872315..9833b0d 100644 --- a/test/vector_test.cpp +++ b/test/vector_test.cpp @@ -39,6 +39,13 @@ template class boost::container::vector >; +namespace container_detail { + +template class vector_const_iterator; +template class vector_iterator; + +} + }} int test_expand_bwd()