M
Martin Magnusson
I have a typedef which looks like this:
typedef std::list< const S* const > seq_type;
I also have a class with a private field:
seq_type m_Sequence;
When calling the following method
M::AddSequence( seq_type seq )
{
m_Sequence.insert( m_Sequence.begin(),
seq.begin(),
seq.end() );
}
which is supposed to prepend the list "seq" to "m_Sequence" gcc tells me
that:
/usr/include/c++/3.2/bits/stl_construct.h:78: static_cast from type
`const S* const*' to type `void*' casts away constness
Why is that?
/ martin
typedef std::list< const S* const > seq_type;
I also have a class with a private field:
seq_type m_Sequence;
When calling the following method
M::AddSequence( seq_type seq )
{
m_Sequence.insert( m_Sequence.begin(),
seq.begin(),
seq.end() );
}
which is supposed to prepend the list "seq" to "m_Sequence" gcc tells me
that:
/usr/include/c++/3.2/bits/stl_construct.h:78: static_cast from type
`const S* const*' to type `void*' casts away constness
Why is that?
/ martin