The boost ptr_list documentation states that the container uses an underlying std::list<void*>.
Why are they using this type instead of a more specialized std::list<T*>?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s probably to cut down on the number of template instantiations. If it uses a
std::list<T*>, then every use ofptr_list<T>would also instantiatestd::list<T*>. That’s a lot of instantiations if you useptr_lista lot.