Name

shared_array: Class template stores a pointer to a dynamically allocated array.


Synopsis

namespace boost {

  template<class T> class shared_array {

    public:
      typedef T element_type;

      explicit shared_array(T * p = 0);
      template<class D> shared_array(T * p, D d);
      ~shared_array(); // never throws

      shared_array(shared_array const & r); // never throws

      shared_array & operator=(shared_array const & r); // never throws

      void reset(T * p = 0);
      template<class D> void reset(T * p, D d);

      T & operator[](std::ptrdiff_t i) const() const; // never throws
      T * get() const; // never throws

      bool unique() const; // never throws
      long use_count() const; // never throws

      operator unspecified-bool-type() const; // never throws

      void swap(shared_array<T> & b); // never throws
  };

  template<class T>
    bool operator==(shared_array<T> const & a, shared_array<T> const & b); // never throws
  template<class T>
    bool operator!=(shared_array<T> const & a, shared_array<T> const & b); // never throws
  template<class T>
    bool operator<(shared_array<T> const & a, shared_array<T> const & b); // never throws

  template<class T> void swap(shared_array<T> & a, shared_array<T> & b); // never throws

}

Detailed Description

Click here for more details.


Limitation

None


Feedback

For additional information or queries on this page send feedback.


© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user.

Top

Legal Disclaimer Please note, that by using some of the links in this document you will leave the Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. website and the site you enter is not operated by Nokia. If you choose to access such sites, you should take precautions for security or content. By using the site, you shall review and agree to the site's rules of use before using the site. You agree and acknowledge that Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. has no control over the service and will not assume any liability or responsibility for the availability of the site, nor for any aspects of the service.