From 4afc08e45ca8ce9c64c6af992803c7ead5b6362d Mon Sep 17 00:00:00 2001 From: Ronald Garcia Date: Tue, 23 Jul 2002 15:42:49 +0000 Subject: [PATCH] Corrected some warnings/errors. Mostly missing 'typename' keywords. [SVN r14574] --- include/boost/multi_array/algorithm.hpp | 2 +- include/boost/multi_array/multi_array_ref.hpp | 4 ++-- include/boost/multi_array/subarray.hpp | 4 ++-- include/boost/multi_array/view.hpp | 4 ++-- test/iterators.cpp | 2 ++ 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/boost/multi_array/algorithm.hpp b/include/boost/multi_array/algorithm.hpp index 3b2f2fd..0d1d423 100644 --- a/include/boost/multi_array/algorithm.hpp +++ b/include/boost/multi_array/algorithm.hpp @@ -83,7 +83,7 @@ copy_n__(RAIter first, Size count, template inline OutputIter copy_n__(InputIter first, Size count, OutputIter result) { - typedef std::iterator_traits::iterator_category cat; + typedef typename std::iterator_traits::iterator_category cat; return copy_n__(first, count, result, cat()); } diff --git a/include/boost/multi_array/multi_array_ref.hpp b/include/boost/multi_array/multi_array_ref.hpp index 2bf540b..cdefb6c 100644 --- a/include/boost/multi_array/multi_array_ref.hpp +++ b/include/boost/multi_array/multi_array_ref.hpp @@ -221,7 +221,7 @@ public: operator[](const detail::multi_array:: index_gen& indices) const { - typedef const_array_view::type return_type; + typedef typename const_array_view::type return_type; return super_type::generate_array_view(boost::type(), indices, @@ -507,7 +507,7 @@ public: typename array_view::type operator[](const detail::multi_array:: index_gen& indices) { - typedef array_view::type return_type; + typedef typename array_view::type return_type; return super_type::generate_array_view(boost::type(), indices, diff --git a/include/boost/multi_array/subarray.hpp b/include/boost/multi_array/subarray.hpp index e4fe3f6..2aa1070 100644 --- a/include/boost/multi_array/subarray.hpp +++ b/include/boost/multi_array/subarray.hpp @@ -95,7 +95,7 @@ public: operator[](const boost::detail::multi_array:: index_gen& indices) const { - typedef const_array_view::type return_type; + typedef typename const_array_view::type return_type; return super_type::generate_array_view(boost::type(), indices, @@ -273,7 +273,7 @@ public: typename array_view::type operator[](const boost::detail::multi_array:: index_gen& indices) { - typedef array_view::type return_type; + typedef typename array_view::type return_type; return super_type::generate_array_view(boost::type(), indices, diff --git a/include/boost/multi_array/view.hpp b/include/boost/multi_array/view.hpp index 2e3b217..5484c9d 100644 --- a/include/boost/multi_array/view.hpp +++ b/include/boost/multi_array/view.hpp @@ -132,7 +132,7 @@ public: operator[](const boost::detail::multi_array:: index_gen& indices) const { - typedef const_array_view::type return_type; + typedef typename const_array_view::type return_type; return super_type::generate_array_view(boost::type(), indices, @@ -339,7 +339,7 @@ public: typename array_view::type operator[](const boost::detail::multi_array:: index_gen& indices) { - typedef array_view::type return_type; + typedef typename array_view::type return_type; return super_type::generate_array_view(boost::type(), indices, diff --git a/test/iterators.cpp b/test/iterators.cpp index 63d00cc..6c861e5 100644 --- a/test/iterators.cpp +++ b/test/iterators.cpp @@ -5,6 +5,7 @@ #define MULTIARRAY_TEST_ASSIGN #include "generative_tests.hpp" +#include "boost/concept_check.hpp" // for ignore_unused_variable_warning // iterator-test-specific code @@ -112,6 +113,7 @@ void construct_iterators(Array&) { #endif typename Array::const_iterator ci2 = i1; typename Array::const_reverse_iterator cr2 = cr1; + ignore_unused_variable_warning(cr2); } }