[assign] intel failures in list_of

hi, 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? Stefan instantiation of "Array boost::assign_detail::converter<DerivedTAssign>::convert(const Array *, boost::assign_detail::array_type_tag) const [with DerivedTAssign=boost::assign_detail::generic_list<boost::assign_detail::generic_list<int>>, Array=const boost::array<boost::array<int, 3U>, 3U>]" at line 129 instantiation of "Container boost::assign_detail::converter<DerivedTAssign>::convert_to_container<Container>() const [with DerivedTAssign=boost::assign_detail::generic_list<boost::assign_detail::generic_list<int>>, 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" );

Stefan Slapeta wrote:
hi,
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?
A compiler bug?
instantiation of "Array boost::assign_detail::converter<DerivedTAssign>::convert(const Array *,
Array=const boost::array<boost::array<int, 3U>, 3U>]" at line 129
This doesn't make much sense. so the argument to convert should be of type const const boost::array< .... > ? :-)
- Array ar; + typename remove_const<Array>::type ar;
Applied as follows: #if BOOST_WORKAROUND(BOOST_INTEL, <= 900 ) BOOST_DEDUCED_TYPENAME remove_const<Array>::type ar; #else Array ar; #endif Is that the right version number? Thanks Thorsten

Thorsten Ottosen wrote:
A compiler bug?
yes and found: template< class Container > operator Container() const { ... } Intel deduces a 'const Container' here for initializations! I've submitted a bug report.
Applied as follows:
#if BOOST_WORKAROUND(BOOST_INTEL, <= 900 ) BOOST_DEDUCED_TYPENAME remove_const<Array>::type ar; #else Array ar; #endif
Is that the right version number?
yes! thanks, I hope I don't forget to inform you when Intel has fixed the problem :-) stefan
participants (2)
-
Stefan Slapeta
-
Thorsten Ottosen