Lazy constructor init fix

This commit is contained in:
Pavel Kirienko 2014-03-08 18:53:42 +04:00
parent fd454a77f8
commit 7b4ef80c40

View File

@ -42,11 +42,14 @@ class LazyConstructor
public:
LazyConstructor()
: ptr_(NULL)
{ }
{
std::fill(data_, data_ + sizeof(T), 0);
}
LazyConstructor(const LazyConstructor<T>& rhs)
: ptr_(NULL)
{
std::fill(data_, data_ + sizeof(T), 0);
if (rhs)
construct(*rhs); // Invoke copy constructor
}