* Fixed ByteBuffer::read<std::string> specialization. This one is correct.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2009-03-19 17:13:56 +01:00
parent 4877009098
commit 6c32bd5441

View File

@@ -228,12 +228,6 @@ class ByteBuffer
_rpos += sizeof(T);
return r;
};
/*template<> std::string read<std::string>()
{
std::string tmp;
*this >> tmp;
return tmp;
}*/
template <typename T> T read(size_t pos) const
{
ASSERT(pos + sizeof(T) <= size() || PrintPosError(false,pos,sizeof(T)));
@@ -510,5 +504,13 @@ template <typename K, typename V> ByteBuffer &operator>>(ByteBuffer &b, std::map
}
return b;
}
// TODO: Make a ByteBuffer.cpp and move all this inlining to it.
template<> inline std::string ByteBuffer::read<std::string>()
{
std::string tmp;
*this >> tmp;
return tmp;
}
#endif