|
Boost : |
From: Philipp Thomas (pth_at_[hidden])
Date: 2005-08-17 11:30:17
boost_1_33_0/boost/pending/property.hpp has
template <class Tag, class T, class Base = no_property>
struct property : public Base {
typedef Base next_type;
typedef Tag tag_type;
typedef T value_type;
property() { }
property(const T& v) : m_value(v) { }
property(const T& v, const Base& b) : Base(b), m_value(v) { }
// copy constructor and assignment operator will be generated by compiler
T m_value;
};
The bug here is that the empty ctor does not initialize m_value which leads
to gcc 4.0.1 warning about m_value being used uninitialized. As our
automatic build system rejects packages with such warnings I had to fix
it :)
This is the patch I'm using:
--- boost/pending/property.hpp
+++ boost/pending/property.hpp
@@ -22,7 +22,7 @@
typedef Base next_type;
typedef Tag tag_type;
typedef T value_type;
- property() { }
+ property() : m_value() { }
property(const T& v) : m_value(v) { }
property(const T& v, const Base& b) : Base(b), m_value(v) { }
// copy constructor and assignment operator will be generated by compiler
Philipp
-- Philipp Thomas <pth_at_[hidden]> Research & Development SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuremberg, Germany
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk