epoc32/include/stdapis/boost/get_pointer.hpp
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright Peter Dimov and David Abrahams 2002.
     2 // Distributed under the Boost Software License, Version 1.0. (See
     3 // accompanying file LICENSE_1_0.txt or copy at
     4 // http://www.boost.org/LICENSE_1_0.txt)
     5 #ifndef GET_POINTER_DWA20021219_HPP
     6 # define GET_POINTER_DWA20021219_HPP
     7 
     8 # include <memory>
     9 
    10 namespace boost { 
    11 
    12 // get_pointer(p) extracts a ->* capable pointer from p
    13 
    14 template<class T> T * get_pointer(T * p)
    15 {
    16     return p;
    17 }
    18 
    19 // get_pointer(shared_ptr<T> const & p) has been moved to shared_ptr.hpp
    20 
    21 template<class T> T * get_pointer(std::auto_ptr<T> const& p)
    22 {
    23     return p.get();
    24 }
    25 
    26 
    27 } // namespace boost
    28 
    29 #endif // GET_POINTER_DWA20021219_HPP