Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9338: VS2005 compiler errors in swap() definition after including container/memory_util.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-17 13:16:49
#9338: VS2005 compiler errors in swap() definition after including
container/memory_util.hpp
----------------------------------------+------------------------
Reporter: Fedor Trushkin <ted-xp@â¦> | Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------------+------------------------
Comment (by igaztanaga):
If the template argument "Fun" has a member swap defined as:
{{{
struct Func
{
void swap() const
{}
};
}}}
Then the trait would lie and it would tell us that such member does not
exist (the wrapper is a derived class that hides the base method). If you
replace
{{{
boost_intrusive_has_member_function_callable_with::private_type swap()
const;
}}}
with (variadic version)
{{{
boost_intrusive_has_member_function_callable_with::private_type swap(...)
const;
}}}
then a compilation error would be triggered as
{{{
boost::move_detail::declval<FunWrap>().swap()
}}}
would be ambiguous (the compiler does not know if the variadic version
from the wrapper or the base zero argument version should be called.
In non-zero argument cases, a special argument "dont_care" is used
generated a very different member overload. If that is selected, then the
member does not exist. With 0 arguments, this is not possible.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9338#comment:4> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC