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-16 21:53:34
#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):
Thanks for the report. I've tried to find a workaround with no luck. It's
definitely a bug in the compiler, a really strange one. If your swap
function is declared in a namespace the error disappears. The bug is
present at least from Visual 2003.
The error is triggered from
boost/intrusive/detail/has_member_function_callable_with.hpp, which
produces (for swap) the code
template< class F
, std::size_t N =
sizeof((boost::move_detail::declval<F>().swap (), 0))>
struct zeroarg_checker_swap
This ".swap()" call in the sizeof expression to use SFINAE to detect if
the expression is correct seems to provoke the error. Sadly, I haven't
found any workaround.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9338#comment:2> 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