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
March 01, 2004

Strict Ownership in STL Containers

(Page 4 of 6)
March 04:

Listing 3: Using DynTmp.

DynTmp<Foo> getFoo() {return new Foo;}
DynTmp<Foo> getFoo2() {
    DynObj<Foo> foo(new Foo);
    return foo.moveToTmp();
}
int main() {
    DynObj<const Foo> foo( getFoo() );
    getFoo2();
}




    
    
      
    
    
Previous Page | 1 | 2 | 3 | 4 | 5 | 6 Next Page
RELATED ARTICLES
No Related Articles
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK