This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] missing template argument in __weak_ptr::lock


> __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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]