Boost logo

Boost :

From: Stefan Slapeta (stefan_at_[hidden])
Date: 2005-12-16 02:19:01


I've looked into this now. I don't know where it originally comes from
(because Intel seems not to print the whole instantiation stack), but
the 'Array' type in list_of line 157 is const which is of course not
desirable for the local temporary array.

So, the attached fix *would* fix the problem for intel but it gives no
answer why there is a const type with this compiler.

Any thoughts?


instantiation of "Array
boost::assign_detail::converter<DerivedTAssign>::convert(const Array *,
boost::assign_detail::array_type_tag) const [with
Array=const boost::array<boost::array<int, 3U>, 3U>]" at line 129

instantiation of "Container
const [with
Container=const boost::array<boost::array<int, 3U>, 3U>]" at line 336

instantiation of "boost::assign_detail::generic_list<T>::operator
Adapter() const [with T=boost::assign_detail::generic_list<int>,
Container=const boost::array<boost::array<int, 3U>, 3U>]"

RCS file: /cvsroot/boost/boost/boost/assign/list_of.hpp,v
retrieving revision 1.24
diff -u -r1.24 list_of.hpp
--- list_of.hpp 20 May 2005 22:49:11 -0000 1.24
+++ list_of.hpp 16 Dec 2005 07:14:38 -0000
@@ -157,7 +157,7 @@
         Array convert( const Array*, array_type_tag ) const
             typedef BOOST_DEDUCED_TYPENAME Array::value_type value_type;
- Array ar;
+ typename remove_const<Array>::type ar;
             const std::size_t sz = ar.size();
             if( sz < static_cast<const DerivedTAssign*>(this)->size() )
                 throw assign::assignment_exception( "array initialized with too many elements" );

Boost list run by bdawes at, gregod at, cpdaniel at, john at