August 01, 2003
Generalized String Manipulation: Access Shims and Type TunnelingListing 3: Adaptive veneer: providing implicit conversion
template <typename T>
class implicit_veneer
: public S
, is_veneer<S, implicit_veneer<S> >
{
public:
typedef S parent_class_type;
typedef typename S::value_type value_type;
// Other methods, including constructors
...
operator value_type const *() const
{
return parent_class_type::c_str();
}
};
|
|
||||||||||||||||||||||||||||
|
|