Re: warnings
Re: warnings
- Subject: Re: warnings
- From: Andy Wiese <email@hidden>
- Date: Tue, 16 Nov 2004 11:32:49 -0600
On Nov 16, 2004, at 11:05 AM, Steve Mills wrote:
Still working on moving projects from CW to Xcode. What exactly does
this one mean and how can it be fixed?
warning: `std::vector<T, std::allocator<_CharT> >::iterator' is
implicitly a typename
warning: implicit typename is deprecated, please see the documentation
for details
It appears here at the declaration of the iterator "it" below:
template <class T> class fVectorInterface : public fDataInterface
{
protected:
typedef vector<T> MyVectorType;
MyVectorType* iVectorOPtr; // not owned by this object
public:
<snip>
virtual void MoveCell(long fromIndex, long toIndex)
{
Dogbert_Assert(iVectorOPtr != nil);
MyVectorType::iterator it = iVectorOPtr->begin() + fromIndex;
T temp = *it;
iVectorOPtr->erase(it);
if(toIndex > fromIndex)
toIndex--;
it = iVectorOPtr->begin() + toIndex;
iVectorOPtr->insert(it, temp);
}
};
You can see that I tried typedef'ing it, which didn't help. I've also
tried putting "typename" in there to no avail.
I am also moving a c++ project from codewarrior to Xcode, and I've seen
this error too. Everytime it has been the omission of a "typename"
qualifier. Are you sure you haven't just missed the getting it in the
right spot? I would expect it to require: typename
MyVectorType::iterator.
I admit that I am always a little fuzzy on where the typename qualifier
is required, and CodeWarrior is very forgiving, while gcc is rather
strict.
Moving c++ from CW to g++ is a real workout, ain't it?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >warnings (From: Steve Mills <email@hidden>) |