This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
unique_ptr and operator<<
- From: <papa at arbolone dot ca>
- To: "MinGW-64 Mailinglist" <mingw-w64-public at lists dot sourceforge dot net>, "gcc-help Mailing List" <gcc-help at gcc dot gnu dot org>
- Date: Sun, 5 Jul 2015 09:40:30 -0400
- Subject: unique_ptr and operator<<
- Authentication-results: sourceware.org; auth=none
Can anyone, pleeese, tell me why this extractor operator is not causing this
error:
C:\tmp\adfs\main.cpp|20|error: no match for 'operator<<' (operand types are
'std::wostream {aka std::basic_ostream<wchar_t>}' and
'std::unique_ptr<jme::Name>')|
namespace abc{
class MyClass{
private:
int nuestro;
public:
MyClass(){}
virtual MyClass(){}
friend std::wostream& operator<<( std::wostream& os, const abc::Name&
obj );
};//class
}//namespace abc
cpp file
~~~~~~~~
namespace abc{
std::wostream& operator<<(abc::wostream& os, const abc::Name& obj) {
return os << obj.getFirstName() << " "
<< obj.getMiddleName() << " "
<< obj.getLastName();
}//operator<<
} // namespace
---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com