[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost
Subject:    Re: [boost] shared_ptr<>: why no operator[] ?
From:       Julien Nitard <julien.nitard () m4tp ! org>
Date:       2011-07-27 9:31:16
Message-ID: CAJosjAM_b-xzrEszpdHZNZsFz2PxdeK8RZujmyAGgr-SKDT8JA () mail ! gmail ! com
[Download RAW message or body]

>
> boost::shared_ptr<int> p(new int(42));
>

Correct me if I am wrong but this is perfectly valid. It allocates a single
int and assigns it the value 42. It doesn't create an array.

regards,

Julien
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic