[C++-sig] Re: Boost.Python unnamed enums at global scope
Niall Douglas
s_sourceforge at nedprod.com
Sun Aug 3 16:19:28 CEST 2003
On 3 Aug 2003 at 0:33, David Abrahams wrote:
> > d:\Tornado\TClient\boost\boost\python\operators.hpp(190) : error
> > C2678: binary '<<' : no operator found which takes a left-hand
> > operand of type 'const boost::python::detail::unwrap_other<T>::type'
> > (or there is no acceptable conversion)
> > with
> > [
> > T=boost::python::other<FX::FXStream>
> > ]
> > d:\Tornado\TClient\boost\boost\python\operators.hpp(190) :
> > while compiling class-template member function 'PyObject
> > *boost::python::detail::operator_r<op_lshift>::apply<L,R>::execute(c
> > on st R &,const L &)'
> > with
> > [
> >
> > L=boost::python::detail::unwrap_other<boost::python::other<FX::FXStr
> > ea m>>::type,
> > R=FX::FXId
> > ]
> > d:\Tornado\TClient\boost\boost\python\operators.hpp(63) :
> > see
> > reference to class template instantiation
> > 'boost::python::detail::operator_r<op_lshift>::apply<L,R>' being
> > compiled
> > with
> > [
> >
> > L=boost::python::detail::unwrap_other<boost::python::other<FX::FXStr
> > ea m>>::type,
> > R=FX::FXId
> > ]
> > d:\Tornado\TClient\boost\boost\python\operators.hpp(107) :
> > see reference to class template instantiation
> > 'boost::python::detail::operator_r_inner<id,L,R>' being compiled
> > with
> > [
> > id=op_lshift,
> >
> > L=boost::python::detail::unwrap_other<boost::python::other<FX::FXStr
> > ea m>>::type,
> > R=FX::FXId
> > ]
> > d:\Tornado\TClient\boost\boost\python\class.hpp(330) : see
> > reference to class template instantiation
> > 'boost::python::detail::binary_op_r<id,L>::apply<T>' being compiled
> > with
> > [
> > id=op_lshift,
> >
> > L=boost::python::detail::unwrap_other<boost::python::other<FX::FXStr
> > ea m>>::type,
> > T=FX::FXId
> > ]
> > d:\Tornado\TClient\TnFOX\pythonbinds\_tnfox.cpp(1846) : see
> > reference to function template instantiation
> > 'boost::python::class_<T,X1,X2>::self
> > &boost::python::class_<T,X1,X2>::def<op_lshift,boost::python::other<
> > FX ::FXStream>,boost::python::self_ns::self_t>(const
> > boost::python::detail::operator_<id,L,R> &)' being compiled
> > with
> > [
> > T=FX::FXId,
> > X1=boost::noncopyable,
> > X2=`anonymous-namespace'::FX_FXId_Wrapper,
> > id=op_lshift,
> > L=boost::python::other<FX::FXStream>,
> > R=boost::python::self_ns::self_t
> > ]
> >
> > This results from a user defined << operator which pyste defined
> > using .def( other< FX::FXStream >() << self ). This appears to be
> > correct.
>
> What appears to be correct?
How pyste has generated the << operator specification ie; I'm saying
pyste appears to be generating the right code.
> > The same problem occurs for the >> operator and furthermore it seems
> > to happen with basic types as well as user defined ones (though
> > still working with FXStream). Removing them all makes the problem go
> > away :)
>
> Removing what makes the problem go away?
The definition ie; remove all overloads of the << and >> operators.
> What compiler are you using?
MSVC7.1
> Can you post a small reproducible test case?
I'll get onto it.
Cheers,
Niall
More information about the Cplusplus-sig
mailing list