Boost logo

Boost Users :

Subject: Re: [Boost-users] [1.53.0] Beta1 release available
From: Ioannis Papadopoulos (ipapadop_at_[hidden])
Date: 2013-01-19 17:14:39


On 01/19/2013 09:59 AM, Marshall Clow wrote:
> On Jan 18, 2013, at 5:17 PM, Ioannis Papadopoulos <ipapadop_at_[hidden]> wrote:
>
>> [...]
>> It either needs BOOST_NOEXCEPT in memory.hpp or removed in
>> shared_ptr.hpp for the offending functions.
>
> That seems like a good idea to me. In fact, there are several prototypes in memory.h that need it.
>
> here's a proposed patch:
>
> Index: boost/tr1/memory.hpp
> ===================================================================
> --- boost/tr1/memory.hpp (revision 82534)
> +++ boost/tr1/memory.hpp (working copy)
> @@ -23,12 +23,12 @@
> class bad_weak_ptr;
> template<class T> class weak_ptr;
> template<class T> class shared_ptr;
> -template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b);
> -template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b);
> -template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r);
> -template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r);
> -template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r);
> -template<class D, class T> D * get_deleter(shared_ptr<T> const & p);
> +template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b) BOOST_NOEXCEPT;
> +template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b) BOOST_NOEXCEPT;
> +template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r) BOOST_NOEXCEPT;
> +template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r) BOOST_NOEXCEPT;
> +template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r) BOOST_NOEXCEPT;
> +template<class D, class T> D * get_deleter(shared_ptr<T> const & p) BOOST_NOEXCEPT;
> template<class T> class enable_shared_from_this;
>
> namespace detail{
>
>
> With this patch, your test program compiles cleanly here.
> Can you test this patch on your system?
>
>
>
> -- Marshall
>
> Marshall Clow Idio Software <mailto:mclow.lists_at_[hidden]>
>
> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
> -- Yu Suzuki
>

With this patch, my test cases pass.

Thanks


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net