FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
August 01, 2003

Generalized String Manipulation: Access Shims and Type Tunneling

(Page 7 of 20)
Listing 3: Adaptive veneer: providing implicit conversion

Listing 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();
  }
};

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 Next Page
RELATED ARTICLES
No Related Articles
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK