This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] missing template argument in __weak_ptr::lock
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: "Jonathan Wakely" <jwakely dot gcc at gmail dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 13 Sep 2007 18:22:05 -0500
- Subject: Re: [patch] missing template argument in __weak_ptr::lock
- References: <4348dea50709100815y43d5ca6ewf7acc2c4ad51c5f@mail.gmail.com>
> __weak_ptr<Tp, Lp>::lock() cannot be instantiated when Lp !=
> __default_lock_policy, as shown by the second of these new tests. The
> other test is to ensure something similar doesn't happen with
> __shared_ptr.
>
> The errors are of the form:
> /src/gcc/build/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1_impl/boost_shared_ptr.h:859:
> error: conversion from 'std::tr1::__shared_ptr<int, _S_atomic>' to
> non-scalar type 'std::tr1::__shared_ptr<int, _S_single>' requested
Bummer.
I can reproduce this.
> Are the new tests OK? There is no explicit instantiation for
> __shared_ptr<void, Lp> because its operator* can't be instantiated.
>
> tested x86_64/linux, OK for mainline?
Yes, and 4_2-branch.
> I don't have a 4.2 compiler built to test yet, but I guess this should
> also go on that branch once 4.2.2 is released.
Indeed.
best,
benjamin