Vladimir Grigoriev
2010-01-12 16:00:34 UTC
Another question.
When I include std::rel_ops before the main() my code compiles. When I
include the operators inside the main the compiler issues errors. May I use
using std::rel_ops::operator !=;
using std::rel_ops::operator >;
using std::rel_ops::operator <=;
using std::rel_ops::operator >=;
statements inside a code block such a way that the compiler could deduce
template arguments?
Vladimir Grigoriev
c:\program files\microsoft visual studio 8\vc\include\functional(165) :
error C2784: 'bool std::operator <=(const std::reverse_iterator<_RanIt>
&,const std::reverse_iterator<_RanIt2> &)' : could not deduce template
argument for 'const std::reverse_iterator<_RanIt> &' from 'const element'
c:\program files\microsoft visual studio 8\vc\include\xutility(1858)
: see declaration of 'std::operator <='
c:\program files\microsoft visual studio
8\vc\include\functional(164) : while compiling class template member
function 'bool std::less_equal<_Ty>::operator ()(const _Ty &,const _Ty &)
const'
with
[
_Ty=element
]
When I include std::rel_ops before the main() my code compiles. When I
include the operators inside the main the compiler issues errors. May I use
using std::rel_ops::operator !=;
using std::rel_ops::operator >;
using std::rel_ops::operator <=;
using std::rel_ops::operator >=;
statements inside a code block such a way that the compiler could deduce
template arguments?
Vladimir Grigoriev
c:\program files\microsoft visual studio 8\vc\include\functional(165) :
error C2784: 'bool std::operator <=(const std::reverse_iterator<_RanIt>
&,const std::reverse_iterator<_RanIt2> &)' : could not deduce template
argument for 'const std::reverse_iterator<_RanIt> &' from 'const element'
c:\program files\microsoft visual studio 8\vc\include\xutility(1858)
: see declaration of 'std::operator <='
c:\program files\microsoft visual studio
8\vc\include\functional(164) : while compiling class template member
function 'bool std::less_equal<_Ty>::operator ()(const _Ty &,const _Ty &)
const'
with
[
_Ty=element
]