
23 Mar
2006
23 Mar
'06
8:44 p.m.
Felipe Magno de Almeida wrote:
Hi,
STLPort doesnt seem to allow const-types as parameters to std::vector. It chokes in the std::allocator which define const_reference as const reference, making the two the same type. This creates multiple declarations for function-members:
pointer address(reference __x) const { return &__x; } const_pointer address(const_reference __x) const { return &__x; }
Is the STLPort right in this context or should something be done?
I believe that STLPort is correct. std::allocator<int const> isn't valid, and neither is std::vector<int const, A> because a const type is not Assignable.