In function 'std::ostream& operator<<(std::ostream&, const Foo&)':
31:25: error: ambiguous overload for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'const string {aka const std::basic_string<char>}')
31:25: note: candidates are:
10:10: note: std::ostream& operator<<(std::ostream&, const X<T, Args ...>&) [with T = char; X = std::basic_string; Args = {std::char_traits<char>, std::allocator<char>}; std::ostream = std::basic_ostream<char>]
29:10: note: std::ostream& operator<<(std::ostream&, const Foo&)
In file included from /usr/include/c++/4.9/iostream:39:0,
from 1:
/usr/include/c++/4.9/ostream:602:5: note: std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = std::basic_string<char>] <near match>
operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
^
/usr/include/c++/4.9/ostream:602:5: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::basic_ostream<char>&&'
In file included from /usr/include/c++/4.9/string:52:0,
from /usr/include/c++/4.9/bits/locale_classes.h:40,
from /usr/include/c++/4.9/bits/ios_base.h:41,
from /usr/include/c++/4.9/ios:42,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from 1:
/usr/include/c++/4.9/bits/basic_string.h:2772:5: note: std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
32:1: warning: control reaches end of non-void function [-Wreturn-type]
|