Skip to content

Commit

Permalink
Vutils
Browse files Browse the repository at this point in the history
  • Loading branch information
vic4key committed Oct 2, 2023
1 parent 7e4c4a5 commit f22c18a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/Vutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -1084,8 +1084,8 @@ class VariantT
return *m_data;
}

template<typename T>
friend VariantT& operator<<(VariantT& stream, T v)
template<typename V>
friend VariantT& operator<<(VariantT& stream, V v)
{
stream.data() << v;
return stream;
Expand Down
12 changes: 6 additions & 6 deletions src/details/strfmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,11 +752,11 @@ std::unique_ptr<byte[]> VariantT<T>::to_bytes() const
{
std::vector<byte> bytes;

if (typeid(typename T) == typeid(std::stringstream))
if (typeid(T) == typeid(std::stringstream))
{
to_hex_bytes_A((const char*)m_data->str().c_str(), bytes);
}
else if (typeid(typename T) == typeid(std::wstringstream))
else if (typeid(T) == typeid(std::wstringstream))
{
to_hex_bytes_W((const wchar_t*)m_data->str().c_str(), bytes);
}
Expand All @@ -779,8 +779,6 @@ std::unique_ptr<byte[]> VariantT<T>::to_bytes() const
* VariantA
*/

template VariantTA;

VariantA::VariantA() : VariantT()
{
}
Expand All @@ -798,12 +796,12 @@ std::string VariantA::to_string() const
return m_data->str();
}

template class VariantTA;

/**
* VariantW
*/

template class VariantTW;

VariantW::VariantW() : VariantT()
{
}
Expand All @@ -821,6 +819,8 @@ std::wstring VariantW::to_string() const
return m_data->str();
}

template class VariantTW;

#ifdef _MSC_VER
#pragma warning(pop)
#endif // _MSC_VER
Expand Down

0 comments on commit f22c18a

Please sign in to comment.