Boost logo

Boost Users :

Subject: [Boost-users] Duplicate function in composite_key.hpp ?
From: John M. Dlugosz (mpbecey7gu_at_[hidden])
Date: 2015-12-21 08:55:50


I'm getting

E:\C++Libs\boost_1_59_0\boost/multi_index/composite_key.hpp(638): error C2535:
'boost::multi_index::composite_key_result<boost::multi_index::composite_key<const
vst::Foo1::Bar2::Baz3,boost::multi_index::const_mem_fun<vst::Foo1::Bar2::Baz3,UID,UID
vst::Foo1::Bar2::Baz3::owner(void)
const>,boost::multi_index::member<vst::Foo1::Bar2::Baz3,const
uint32_t,pointer-to-member(0x18)>,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>>
boost::multi_index::composite_key<const
vst::Foo1::Bar2::Baz3,boost::multi_index::const_mem_fun<vst::Foo1::Bar2::Baz3,UID,UID
vst::Foo1::Bar2::Baz3::owner(void)
const>,boost::multi_index::member<vst::Foo1::Bar2::Baz3,const
uint32_t,pointer-to-member(0x18)>,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>::operator
()(const boost::reference_wrapper<const Class> &) const': member function already defined
or declared
           with
           [
               Class=vst::Foo1::Bar2::Baz3
           ] (compiling source file Bar2\Delta.cpp)

(actual names from my code have been sanitized)

Using Boost 1.59 and VS2015.

The function it points to is result_type operator()(const reference_wrapper<value_type>&
x)const
but the error message looks like it is duplicating the previous function in the file,
result_type operator()(const reference_wrapper<const value_type>& x)const

and the chain of instantiation comes through
composite_key.hpp, detail/ord_index_args.hpp(46), mpl/eval_if.hpp(41),
detail/ord_index_args.hpp(70), ordered_index.hpp(65)
           with
           [
Arg1=boost::multi_index::tag<UID,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na,boost::mpl::na>,
               Arg2=boost::multi_index::composite_key<const
vst::Foo1::Bar2::Baz3,boost::multi_index::const_mem_fun<vst::Foo1::Bar2::Baz3,UID,UID
vst::Foo1::Bar2::Baz3::owner(void)
const>,boost::multi_index::member<vst::Foo1::Bar2::Baz3,const
uint32_t,pointer-to-member(0x18)>,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type>,
               Arg3=boost::mpl::na
           ]

What's going on here?

This worked previously with Boost 1.55 and VS2010.


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