|
Boost : |
Subject: Re: [boost] [type_traits][multi_index][msvc-7.1] problems with is_const in VC 7.1
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2015-10-15 16:59:50
On 15/10/2015 20:40, JoaquÃn M LópezMuñoz wrote:
> Won't you have direct access to a local MSVC 7.1 installation to play
> with prior to commiting any changes to github? The if_ thing in
> particular seems inoffensive enough to try out.
I tried with no luck. It doesn't seem related to is_const, MSVC-7.1
considers both
const_ref_global_fun_base::operator()(reference_wrapper<Arg>)
overloads exactly equal, even if BOOST_STATIC_ASSERT in that class
considers both arguments are not the same.
One workaround I've found is to pass one reference_wrapper by const
reference and the other one by value:
//Note, argument taken by const ref (unchanged)
Type operator()(
const reference_wrapper<
typename remove_reference<Value>::type>& x)const
{
return operator()(x.get());
}
//Note, argument taken by value (changed)
Type operator()(
reference_wrapper<
typename remove_const<
typename remove_reference<Value>::type>::type> x)const
{
return operator()(x.get());
}
You could make this conditional to MSVC-7.1, but passing
reference_wrapper by value should lead to the same performance, I guess.
Best,
Ion
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk