[wx-dev] Re: template containers again
Vadim Zeitlin
vadim at wxwidgets.org
Mon Jul 2 03:50:56 PDT 2007
On Mon, 2 Jul 2007 08:08:03 +0200 Vaclav Slavik <vslavik at fastmail.fm> wrote:
VS> That's how I understood Robert's mail, that we would keep the existing
VS> wxVector/wxArray "classes", but make them templates, and keep the
VS> macros for backward compatibility.
But there is no current wxVector/wxArray classes. There is only wxList.
VS> To be perfectly clear, what I think would be the best thing to do is
VS> 1) replace wxVectorBase and the class defined by _WX_DECLARE_VECTOR
VS> with a wxVector<T> template
Yes.
VS> 2) for backward compatibility, define WX_DECLARE_VECTOR as a trivial
VS> wrapper around this new class
Yes.
VS> 3) do the same for other classes where it's possible (i.e. not the old
VS> deprecated wxList class etc.)
I'm not sure if it makes sense to do it with wxArrays, we can leave them
to use the macro-based implementations as we'll want to deprecate them in
favour of wxVector and/or std::vector anyhow in the future.
Anyhow, I think we all agree that we should use templates for wxVector. A
question I have is whether we should do "#define wxVector std::vector" in
wxUSE_STL build?
Regards,
VZ
More information about the wx-dev
mailing list