---- Martin Owens <doctormo@...400...> wrote:
On Tue, 2014-01-21 at 19:04 +0100, Johan Engelen wrote:
> How large do we expect this list to be?
> I advise list<T> for now (moving onto unique_ptr when we make the switch
> to C++11), just for the sake of simplicity and not unnecessarily relying
> on external deps. I think there is a much higher chance of a dev knowing
> the semantics of list<unique_ptr<T>> than boost::ptr_list<T>.
I'm very close to reverting my code back to GSList, that just worked
first time and now that I've turned it into a std::list<SPDocument *>
it's a pile of poo. Just segfaulting because it's not initialized. But
of course no examples in the code base exist of initializing std::list
types. It's like every example code works on magic but my code hate me.
I'm at a loss for how this is supposed to work.
Any help?
Do you know
www.cplusplus.org? I is a helpful reference, with small code examples.
http://www.cplusplus.com/reference/list/list/push_front/
I'm online on IRC now.
-Johan