How can be realized the auto keyword functionality without using c++0x standard?
for(std::deque<std::pair<int, int> >::iterator it = points.begin();
it != points.end(); ++it)
{
...
}
Maybe such class:
class AUTO
{
public:
template <typename T1>
AUTO(T1);
template <typename T2>
operator T2();
};
With such usage:
for(AUTO it = points.begin(); it != points.end(); ++it)
{
...
}
But, T1 and T2 are different. How to move info about T1 to operator T2()? Is it really possible?