|
Re: def( str( self)) error: msg#00241python.c++
Jonathan Brandmeyer <jbrandmeyer@xxxxxxxxxxxxx> writes: > I have a class that uses an overloaded << and >> operators for I/O. > When I try to export that class with the member function .def( str( > self)), I get a 'no function for call to' error. My operator has the > following signature in C++, and works just fine for the standard > streams, and stringstreams: > > namespace std > { > template<typename char_T, class traits> > basic_ostream<char_T, traits>& > operator<<( basic_ostream<char_T, traits>& stream, const > physics::vector& v); // Definition not shown for brevity. > } // !namespace std > > I'm using G++ 3.2.2, with identical errors on Win32/MinGW and Debian > Sid. Well, you're not allowed to add definitions to std:: - your function should go in namespace physics. I'm not sure that would make a difference though; it seems it should be found by Koenig Lookup either way. Bug reporting and help requests 101: Why don't you post a small reproducible example, and at least give the full text of the error message? -- Dave Abrahams Boost Consulting www.boost-consulting.com |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | def( str( self)) error: 00241, Jonathan Brandmeyer |
|---|---|
| Next by Date: | Re: Automatic (implicit ?) type conversion for a data member of a struct.: 00241, David Abrahams |
| Previous by Thread: | def( str( self)) errori: 00241, Jonathan Brandmeyer |
| Next by Thread: | Re: def( str( self)) error: 00241, Jonathan Brandmeyer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |