1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/get_pointer.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,29 @@
1.4 +// Copyright Peter Dimov and David Abrahams 2002.
1.5 +// Distributed under the Boost Software License, Version 1.0. (See
1.6 +// accompanying file LICENSE_1_0.txt or copy at
1.7 +// http://www.boost.org/LICENSE_1_0.txt)
1.8 +#ifndef GET_POINTER_DWA20021219_HPP
1.9 +# define GET_POINTER_DWA20021219_HPP
1.10 +
1.11 +# include <memory>
1.12 +
1.13 +namespace boost {
1.14 +
1.15 +// get_pointer(p) extracts a ->* capable pointer from p
1.16 +
1.17 +template<class T> T * get_pointer(T * p)
1.18 +{
1.19 + return p;
1.20 +}
1.21 +
1.22 +// get_pointer(shared_ptr<T> const & p) has been moved to shared_ptr.hpp
1.23 +
1.24 +template<class T> T * get_pointer(std::auto_ptr<T> const& p)
1.25 +{
1.26 + return p.get();
1.27 +}
1.28 +
1.29 +
1.30 +} // namespace boost
1.31 +
1.32 +#endif // GET_POINTER_DWA20021219_HPP