Skip to content

boost-errors when compiling library #33

@bgewehr

Description

@bgewehr

Hi!

I want to use this library for making the ems-collector able to send and receive MQTT.

The compiler throws errors like this:

MqttAdapter.cpp:41:22:   required from here
/usr/include/boost/multi_index/composite_key.hpp:460:53: error: no match for call to ‘(const std::less<short unsigned int>) (const std::tuple<short unsigned int, unsigned char>&, short unsigned int)’
     if(comp.get_head()(vc.get_head(),c.get_head()(v)))return true;
                                                     ^
In file included from /usr/include/c++/4.9/string:48:0,
                 from /usr/include/c++/4.9/random:40,
                 from /usr/include/c++/4.9/bits/stl_algo.h:66,
                 from /usr/include/c++/4.9/algorithm:62,
                 from MqttAdapter.cpp:20:
/usr/include/c++/4.9/bits/stl_function.h:367:12: note: candidate is:
     struct less : public binary_function<_Tp, _Tp, bool>
            ^
/usr/include/c++/4.9/bits/stl_function.h:370:7: note: bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = short unsigned int]
       operator()(const _Tp& __x, const _Tp& __y) const
       ^
/usr/include/c++/4.9/bits/stl_function.h:370:7: note:   no known conversion for argument 1 from ‘const std::tuple<short unsigned int, unsigned char>’ to ‘const short unsigned int&’
In file included from ../../mqtt_client_cpp/include/mqtt/client.hpp:24:0,
                 from ../../mqtt_client_cpp/include/mqtt_client_cpp.hpp:8,
                 from MqttAdapter.h:28,
                 from MqttAdapter.cpp:22:
/usr/include/boost/multi_index/composite_key.hpp:461:53: error: no match for call to ‘(const std::less<short unsigned int>) (short unsigned int, const std::tuple<short unsigned int, unsigned char>&)’
     if(comp.get_head()(c.get_head()(v),vc.get_head()))return false;
                                                     ^
In file included from /usr/include/c++/4.9/string:48:0,
                 from /usr/include/c++/4.9/random:40,
                 from /usr/include/c++/4.9/bits/stl_algo.h:66,
                 from /usr/include/c++/4.9/algorithm:62,
                 from MqttAdapter.cpp:20:
/usr/include/c++/4.9/bits/stl_function.h:367:12: note: candidate is:
     struct less : public binary_function<_Tp, _Tp, bool>
            ^
/usr/include/c++/4.9/bits/stl_function.h:370:7: note: bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = short unsigned int]
       operator()(const _Tp& __x, const _Tp& __y) const
       ^
/usr/include/c++/4.9/bits/stl_function.h:370:7: note:   no known conversion for argument 2 from ‘const std::tuple<short unsigned int, unsigned char>’ to ‘const short unsigned int&’
Makefile:49: recipe for target 'MqttAdapter.o' failed
make: *** [MqttAdapter.o] Error 1
bananapi@fhem:/home/bananapi/ems-collector/collector$

I have discussed the issue with the author of ems-collector, but without success:
maniac103/ems-collector#18

Can you give me the right hint to resolve that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions