diff --git a/include/Vutils.h b/include/Vutils.h index 75be219..b8989f9 100644 --- a/include/Vutils.h +++ b/include/Vutils.h @@ -1084,8 +1084,8 @@ class VariantT return *m_data; } - template - friend VariantT& operator<<(VariantT& stream, T v) + template + friend VariantT& operator<<(VariantT& stream, V v) { stream.data() << v; return stream; diff --git a/src/details/strfmt.cpp b/src/details/strfmt.cpp index b782711..73b7fd1 100644 --- a/src/details/strfmt.cpp +++ b/src/details/strfmt.cpp @@ -752,11 +752,11 @@ std::unique_ptr VariantT::to_bytes() const { std::vector 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); } @@ -779,8 +779,6 @@ std::unique_ptr VariantT::to_bytes() const * VariantA */ -template VariantTA; - VariantA::VariantA() : VariantT() { } @@ -798,12 +796,12 @@ std::string VariantA::to_string() const return m_data->str(); } +template class VariantTA; + /** * VariantW */ -template class VariantTW; - VariantW::VariantW() : VariantT() { } @@ -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