[wx-dev] confbase.h error in SVN trunk
Vadim Zeitlin
vadim at wxwidgets.org
Wed Aug 1 14:33:51 PDT 2007
On Wed, 1 Aug 2007 10:37:03 -0500 Marcin Wojdyr <wojdyr at gmail.com> wrote:
MW> On 8/1/07, Julian Smart <julian at anthemion.co.uk> wrote:
MW> > appbase.cpp
MW> > ..\..\include\wx/confbase.h(216) : error C2668: 'Read' : ambiguous call
MW> > to overloaded function
MW>
MW> VC6 has limited template support. I guess the call to function
MW> Read(wxString, wxString*) can't be resolved because of the template:
MW>
MW> template <typename T>
MW> bool Read(const wxString& key, T* value) const;
MW>
MW> there is also a full specialization there:
MW> bool Read(const wxString& key, wxString *pStr) const;
MW>
MW> I don't know what should be done about it.
We probably need to define the old Read() as a template specialization
instead of overloading it. But if we don't manage to make this work with
VC6, I think we should rename the template Read() to ReadObject() as you
proposed as it's arguably better than to not support it at all for some
compilers.
Regards,
VZ
More information about the wx-dev
mailing list