Re: "Function template" problem
google_at_lionelb.com
Date: 09/30/04
- Next message: boki: "USB hot-plug detection"
- Previous message: Jef Driesen: "Implementing a templated "round" function?"
- In reply to: Gernot Frisch: "Re: "Function template" problem"
- Next in thread: Gernot Frisch: "Re: "Function template" problem"
- Reply: Gernot Frisch: "Re: "Function template" problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Sep 2004 01:43:07 -0700
Gernot Frisch wrote:
> "Lionel B" <google@lionelb.com> schrieb im Newsbeitrag
> news:e1308e8b.0409292355.34df10ed@posting.google.com...
> > Greetings,
> >
> > I cannot figure out why the following code does not compile:
> >
> > --- BEGIN CODE ---
> >
> > typedef double ftype(double);
>
> what you do is:
> template <double f> double func(f x);
> But: You don't want to give the type of the template argument, since
> it's a "template".
> So, use
>
> template<class C> double fkt(C argC);
Apologies if I'm being obtuse, but I don't understand this reply at all
:(
-- Lionel B
- Next message: boki: "USB hot-plug detection"
- Previous message: Jef Driesen: "Implementing a templated "round" function?"
- In reply to: Gernot Frisch: "Re: "Function template" problem"
- Next in thread: Gernot Frisch: "Re: "Function template" problem"
- Reply: Gernot Frisch: "Re: "Function template" problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|