Topic: operator precedence
Author: "west group" <alex.tyrrell@westgroup.com>
Date: 1998/03/21 Raw View
Hello,
My question is, can I be sure that an operator=() will be invoked before
an operator T (* or &). For example say I have a class->
template <class T > class MyClass
{
void operator =( T & );
operator T &();
};
int i = 2;
MyClass<int> myint;
myint = i;//i want operator= here
myint++;//and operator T& here
can I be sure operator= preempts operator T& ?
Thanks a lot.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]