From 18c7fb72b5ccfc0182a208d6ac897e23346ff77c Mon Sep 17 00:00:00 2001
From: Fernando Cacciola
template class value_initialized<T>
namespace boost {+
template<class T>
class value_initialized
{
public :
value_initialized() : x() {}
operator T&() const { return x ; }
T& data() const { return x ; }
private :
impll-defined x ;
} ;
template<class T>
T const& get ( value_initialized<T> const& x )
{
return x.data() ;
}
template<class T>
T& get ( value_initialized<T>& x )
{
return x.data() ;
}
} // namespace boost
namespace boost {
template<class T>
class value_initialized
{
public :
value_initialized() : x() {}
operator T&() const { return x ; }
T& data() const { return x ; }
private :
unspecified x ;
} ;
template<class T>
T const& get ( value_initialized<T> const& x )
{
return x.data() ;
}
template<class T>
T& get ( value_initialized<T>& x )
{
return x.data() ;
}
} // namespace boost
An object of this template class is a T
-wrapper convertible
to 'T&'
whose wrapped object (data member of type T
)
@@ -216,4 +216,4 @@ at www.yahoogroups.com/list/boos