• 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
using std templates with xCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using std templates with xCode


  • Subject: using std templates with xCode
  • From: Ken Hawkins <email@hidden>
  • Date: Mon, 4 Oct 2004 17:13:02 -0700


Got a class that is defined as such:

template
<class Numeric> class fir
{
public:
long num_taps;
Numeric* coeff;
// protected:
Numeric* z;
Numeric output;


public:
...

friend Vector<Numeric> Vector_taps(fir<Numeric> x);
friend Vector<Numeric> Vector_input(fir<Numeric> y);
void settap(Vector<Numeric> z) {
for (int i=0;i<num_taps;i++) coeff[i] = z[i];
}
};

when compiling under Xcode (C++ tool) command line utility it gives me these errors:

<x-tad-smaller>/Developer/projects/learning/DSP/spux/generic/fir.h:106: warning: ISO C++ forbids declaration of `Vector' with no type
/Developer/projects/learning/DSP/spux/generic/fir.h:106: error: template-id `Vector<Numeric>' used as a declarator
/Developer/projects/learning/DSP/spux/generic/fir.h:106: error: `Vector' is neither function nor member function; cannot be declared friend
</x-tad-smaller>

I know there is a flag that i need to set just can't remember what it is and can't search the archives. anyone?

thanks,
ken;
 _______________________________________________
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: using std templates with xCode
      • From: Pavol Markovic <email@hidden>
  • Prev by Date: Custom XCode Syntax Coloring
  • Next by Date: Beginner question:a static library
  • Previous by thread: Re: [xcode] Custom XCode Syntax Coloring
  • Next by thread: Re: using std templates with xCode
  • Index(es):
    • Date
    • Thread