Boost logo

Boost Users :

Subject: Re: [Boost-users] [Type Erasure] Ambiguous call with vs 2015 community
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-09-01 13:08:41


AMDG

On 08/31/2015 04:53 AM, Yuan Yao wrote:
>
> I try to use type erasure on the free function foo. However, VS 2015
> failed to compile the following code, which is OK with GCC and CLang.
>
> <snip>
> Source.cpp(7): note: could be 'std::type_index
> boost::type_erasure::injectHasGetField<R (const
> boost::type_erasure::_self
> &),Base,boost::type_erasure::index_list<0>>::foo(eval_if_c<0,boost::type_erasure::detail::maybe_const_this_param<const
> boost::type_erasure::_self
> &,Base>,boost::type_erasure::as_param<Base,const
> boost::type_erasure::_self &>>::type)' [found using argument-dependent
> lookup]

This kind of looks like a variadic
template bug. The condition of
the eval_if_c is supposed to evaluate
to true. The whole point of this
eval_if_c business is to prevent the
ambiguity that you're seeing.

In Christ,
Steven Watanabe


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