• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Change in template class handling?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Change in template class handling?


  • Subject: Change in template class handling?
  • From: "Mark Wagner" <email@hidden>
  • Date: Tue, 25 Apr 2006 14:52:19 -0700

A .cpp file containing the following code compiles on CodeWarrior 9
and Xcode 1.5/GCC 3.3, but not on Xcode 2.2/GCC 4.  It shouldn't
compile -- class TArrayOfObj has no member named "len" and there is no
global variable called "len", and pOiArray is a struct with no member
functions, not a class.  Was there some change in how GCC handles
template classes between 3.3 and 4?

template <class T> void TArrayOfObj<T>::setArrayLength( long lElements )
{
 	long currentLen = arrayLength();
  	if (lElements < currentLen)
  		deleteObjs(len, currentLen - len);

  	pOiArray->SetLen(lElements);

  	if (lElements > currentLen)
  		constructObjs(currentLen, lElements - currentLen);
}

--
Mark Wagner
 _______________________________________________
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

  • Follow-Ups:
    • Re: Change in template class handling?
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Re: Obtaining GCC for Mac OS X 10.3
  • Next by Date: Why does xcode flag script output lines as errors?
  • Previous by thread: Re: Obtaining GCC for Mac OS X 10.3
  • Next by thread: Re: Change in template class handling?
  • Index(es):
    • Date
    • Thread