Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-06-03 12:23:45


"John Maddock" <john_at_[hidden]> writes:

>> I am getting the error from Intel C++ at the point of declaration of
>> the compressed_pair specialization.
>
> I've experimented some more, and found one bug in the current
> implementation:
>
> If one of the templates arguments is both const and an empty class, then
> compressed_pair attempts to inherit from the const-class type which
> generates an error for Intel C++, but not strangely for VC++.
>
> I've attached an updated version with some trivial (tested on all the
> compilers I have) fixes, does this fix your problem?

Yes, that does it, thanks. I'll check it in on your behalf.

> BTW, at the risk of stating the obvious, compiler error messages really help
> when reporting issues (JM runs and ducks for cover!).

Okay, here's your next challenge. This is with the very latest Comeau
alpha release compiler.

"c:\boost/boost/type_traits/is_member_function_pointer.hpp", line 67: warning #1290-D:
          non-POD class type passed through ellipsis
          BOOST_STATIC_CONSTANT(
          ^
          detected during:
            instantiation of class
                      "boost::detail::is_mem_fun_pointer_select<false>::result_
                      <T> [with
                      T=boost::details::compressed_pair_imp<boost::sequence::en
                      d_cursor<char [11]>::type,
                      boost::sequence::accessor_::implementation<char [11],
                      void>::type, 1>::second_type]" at line 76
            instantiation of class
                      "boost::detail::is_member_function_pointer_impl<T> [with
                      T=boost::details::compressed_pair_imp<boost::sequence::en
                      d_cursor<char [11]>::type,
                      boost::sequence::accessor_::implementation<char [11],
                      void>::type, 1>::second_type]" at line 118
            instantiation of class "boost::is_member_function_pointer<T> [with
                      T=boost::details::compressed_pair_imp<boost::sequence::en
                      d_cursor<char [11]>::type,
                      boost::sequence::accessor_::implementation<char [11],
                      void>::type, 1>::second_type]" at line 48 of
                      "c:\boost/boost/type_traits/is_member_pointer.hpp"
            instantiation of class "boost::is_member_pointer<T> [with
                      T=boost::details::compressed_pair_imp<boost::sequence::en
                      d_cursor<char [11]>::type,
                      boost::sequence::accessor_::implementation<char [11],
                      void>::type, 1>::second_type]" at line 68 of
                      "c:\boost/boost/type_traits/is_pointer.hpp"
            instantiation of class "boost::detail::is_pointer_impl<T> [with
                      T=boost::details::compressed_pair_imp<boost::sequence::en
                      d_cursor<char [11]>::type,
                      boost::sequence::accessor_::implementation<char [11],
                      void>::type, 1>::second_type]" at line 80 of
                      "c:\boost/boost/type_traits/is_pointer.hpp"
            [ 6 instantiation contexts not shown ]
            instantiation of class "boost::detail::is_empty_impl<T> [with
                      T=boost::compressed_pair<boost::sequence::end_cursor<char
                      [11]>::type,
                      boost::sequence::accessor_::implementation<char [11],
                      void>::type>]" at line 200 of
                      "c:\boost/boost/type_traits/is_empty.hpp"
            instantiation of class "boost::is_empty<T> [with
                      T=boost::compressed_pair<boost::sequence::end_cursor<char
                      [11]>::type,
                      boost::sequence::accessor_::implementation<char [11],
                      void>::type>]" at line 340 of
                      "c:\boost/boost/detail/compressed_pair.hpp"
            instantiation of class "boost::compressed_pair<T1, T2> [with
                      T1=boost::sequence::advanced<boost::sequence::begin_curso
                      r_::implementation<char [11], void>::type,
                      boost::sequence::difference<boost::sequence::end_cursor<c
                      onst char [6]>::type,
                      boost::sequence::begin_cursor_::implementation<const
                      char [6], void>::type>::type>::type,
                      T2=boost::compressed_pair<boost::sequence::end_cursor<cha
                      r [11]>::type,
                      boost::sequence::accessor_::implementation<char [11],
                      void>::type>]" at line 19 of
                      "..\..\..\../boost/sequence/range.hpp"
            instantiation of class "boost::sequence::range_::range<Elements,
                      Begin, End> [with
                      Elements=boost::sequence::accessor_::implementation<char
                      [11], void>::type,
                      Begin=boost::sequence::advanced<boost::sequence::begin_cu
                      rsor_::implementation<char [11], void>::type,
                      boost::sequence::difference<boost::sequence::end_cursor<c
                      onst char [6]>::type,
                      boost::sequence::begin_cursor_::implementation<const
                      char [6], void>::type>::type>::type,
                      End=boost::sequence::end_cursor<char [11]>::type]" at
                      line 23 of
                      "..\..\..\..\boost/sequence/algorithm/copy.hpp"
            instantiation of
                      "boost::sequence::algorithm::dispatch<boost::sequence::al
                      gorithm::copy_ (boost::add_const<Range1>::type &, Range2
                      &)>::type
                      boost::sequence::algorithm::copy_::operator()(const
                      Range1 &, Range2 &) const [with Range1=char [6],
                      Range2=char [11]]" at line 24 of "copy.cpp"

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk