Fixed VC6 compilation - wxAny(const wxVariant&) ctor required a specific 'template<>')
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -679,11 +679,19 @@ public:
|
|||||||
/**
|
/**
|
||||||
Various constructors.
|
Various constructors.
|
||||||
*/
|
*/
|
||||||
|
template<typename T>
|
||||||
|
wxAny(const T& value)
|
||||||
|
{
|
||||||
|
m_type = wxAnyValueTypeImpl<T>::sm_instance;
|
||||||
|
wxAnyValueTypeImpl<T>::SetValue(value, m_buffer);
|
||||||
|
}
|
||||||
|
|
||||||
wxAny(const char* value)
|
wxAny(const char* value)
|
||||||
{
|
{
|
||||||
m_type = wxAnyNullValueType;
|
m_type = wxAnyNullValueType;
|
||||||
Assign(wxString(value));
|
Assign(wxString(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxAny(const wchar_t* value)
|
wxAny(const wchar_t* value)
|
||||||
{
|
{
|
||||||
m_type = wxAnyNullValueType;
|
m_type = wxAnyNullValueType;
|
||||||
@@ -697,6 +705,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_VARIANT
|
#if wxUSE_VARIANT
|
||||||
|
template<>
|
||||||
wxAny(const wxVariant& variant)
|
wxAny(const wxVariant& variant)
|
||||||
{
|
{
|
||||||
m_type = wxAnyNullValueType;
|
m_type = wxAnyNullValueType;
|
||||||
@@ -704,12 +713,6 @@ public:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
wxAny(const T& value)
|
|
||||||
{
|
|
||||||
m_type = wxAnyValueTypeImpl<T>::sm_instance;
|
|
||||||
wxAnyValueTypeImpl<T>::SetValue(value, m_buffer);
|
|
||||||
}
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -914,6 +917,7 @@ public:
|
|||||||
|
|
||||||
#if wxUSE_VARIANT
|
#if wxUSE_VARIANT
|
||||||
// GetAs() wxVariant specialization
|
// GetAs() wxVariant specialization
|
||||||
|
template<>
|
||||||
bool GetAs(wxVariant* value) const
|
bool GetAs(wxVariant* value) const
|
||||||
{
|
{
|
||||||
return wxConvertAnyToVariant(*this, value);
|
return wxConvertAnyToVariant(*this, value);
|
||||||
|
@@ -224,15 +224,15 @@ wxAny wxVariant::GetAny() const
|
|||||||
wxAny any;
|
wxAny any;
|
||||||
|
|
||||||
if ( IsNull() )
|
if ( IsNull() )
|
||||||
return wxAny((const wxAny&)any);
|
return any;
|
||||||
|
|
||||||
wxVariantData* data = GetData();
|
wxVariantData* data = GetData();
|
||||||
|
|
||||||
if ( data->GetAsAny(&any) )
|
if ( data->GetAsAny(&any) )
|
||||||
return wxAny((const wxAny&)any);
|
return any;
|
||||||
|
|
||||||
// If everything else fails, wrap the whole wxVariantData
|
// If everything else fails, wrap the whole wxVariantData
|
||||||
return wxAny(((wxVariantData*)data));
|
return wxAny(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_ANY
|
#endif // wxUSE_ANY
|
||||||
|
Reference in New Issue
Block a user