Opened 9 years ago
Last modified 9 years ago
#8740 new Bugs
Possibly invalid assertion in define_with_defaults()
Reported by: | Owned by: | Ralf W. Grosse-Kunstleve | |
---|---|---|---|
Milestone: | To Be Determined | Component: | python USE GITHUB |
Version: | Boost 1.53.0 | Severity: | Problem |
Keywords: | Cc: | inform@… |
Description
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>’
Note:
See TracTickets
for help on using tickets.