Re: STL set class
"KBI" <KBI@discussions.microsoft.com> wrote in message
news:8C11AC4C-1486-4BF7-98A4-01C103FA02E7@microsoft.com
I am using VC++6.0. ( I know it is old but...)
I tried the following code and got C2664 compile error on line "
set <int> s5( s1_bcIter, s1_ecIter ); ".
VC6 compliler does not support member templates. In particular, your
code attempts to use this constructor:
template <typename It> set(It first, It last);
that is supposed to take arbitrary iterators. Again, VC6 doesn't support
this, and replaces it with
set(const value_type*, const value_type*);
So you can construct from a C-style array or from vector
(vector::iterator just happens to be a pointer in VC6 implementation),
but not from another set or any other container.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925