Subject: [Boost-bugs] [Boost C++ Libraries] #8740: Possibly invalid assertion in define_with_defaults()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-27 16:06:13
#8740: Possibly invalid assertion in define_with_defaults()
------------------------------------------+---------------------
Reporter: Andreas Kloeckner <inform@â¦> | Owner: rwgk
Type: Bugs | Status: new
Milestone: To Be Determined | Component: Python
Version: Boost 1.53.0 | Severity: Problem
Keywords: |
------------------------------------------+---------------------
Hi there,
this assertion in `boost/python/detail/defaults_def.hpp` seems backwards:
{{{
BOOST_STATIC_ASSERT(
(stubs_type::max_args) <= mpl::size<SigT>::value);
}}}
I.e. I would expect the assertion to be that the actual number of
arguments is *smaller* than the max or *larger* than the min.
It caused me a compile error like the following on gcc 4.8:
{{{
In file included from /usr/include/boost/python/overloads.hpp:11:0,
from /usr/include/boost/python.hpp:52,
from src/wrapper/common.hpp:24,
from src/wrapper/id3.cpp:40:
/usr/include/boost/python/detail/defaults_def.hpp: In instantiation of
âvoid boost::python::detail::define_with_defaults(const char*, const
OverloadsT&, NameSpaceT&, const SigT&) [with OverloadsT =
{anonymous}::render_overloads; NameSpaceT =
boost::python::class_<TagLib::ID3v2::Tag,
boost::noncopyable_::noncopyable, boost::python::bases<TagLib::Tag> >;
SigT = boost::mpl::vector2<TagLib::ByteVector, TagLib::ID3v2::Tag&>]â:
/usr/include/boost/python/class.hpp:598:9: required from âvoid
boost::python::class_<T, X1, X2, X3>::def_maybe_overloads(const char*,
SigT, const OverloadsT&, const boost::python::detail::overloads_base*)
[with OverloadsT = {anonymous}::render_overloads; SigT =
TagLib::ByteVector (TagLib::ID3v2::Tag::*)()const; W = TagLib::ID3v2::Tag;
X1 = boost::noncopyable_::noncopyable; X2 =
boost::python::bases<TagLib::Tag>; X3 =
boost::python::detail::not_specified]â
/usr/include/boost/python/class.hpp:245:9: required from
âboost::python::class_<T, X1, X2, X3>::self& boost::python::class_<T, X1,
X2, X3>::def(const char*, A1, const A2&) [with A1 = TagLib::ByteVector
(TagLib::ID3v2::Tag::*)()const; A2 = {anonymous}::render_overloads; W =
TagLib::ID3v2::Tag; X1 = boost::noncopyable_::noncopyable; X2 =
boost::python::bases<TagLib::Tag>; X3 =
boost::python::detail::not_specified; boost::python::class_<T, X1, X2,
X3>::self = boost::python::class_<TagLib::ID3v2::Tag,
boost::noncopyable_::noncopyable, boost::python::bases<TagLib::Tag> >]â
src/wrapper/id3.cpp:221:8: required from here
/usr/include/boost/python/detail/defaults_def.hpp:247:1: error: invalid
application of âsizeofâ to incomplete type
âboost::STATIC_ASSERTION_FAILURE<false>â
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8740> 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:13 UTC