Skip to content

no match for ‘operator<<’ #32

Description

@tom-2015

I get a lot of these errors with the Log(level) function/class when I try to compile on a Raspberry Pi Debian Stretch:

`L3StateMachine.cpp: In member function ‘void Control::MachineBase::machineErrorMessage(int, int, const GSM::L3Message*, const SIP::DialogMessage*, const char*)’:
L3StateMachine.cpp:88:20: error: no match for ‘operator<<’ (operand types are ‘std::ostringstream {aka std::__cxx11::basic_ostringstream}’ and ‘std::ostringstream {aka std:
Log(level).get() <<os <<" Unexpected L3 message:"<<l3msg;

In file included from /usr/include/c++/6/istream:39:0,
              from /usr/include/c++/6/sstream:38,
              from ../CommonLibs/Logger.h:41,
              from L3StateMachine.h:31,
              from L3StateMachine.cpp:19:
/usr/include/c++/6/ostream:628:5: note: candidate: std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Tstringstream<char>] <near match>
  operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
  ^~~~~~~~
`
g++ (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516
Does anyone know a reason/solution?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions