[LC++]limiting paramter-type of parameterized class
Julien Patrick Claassen
julien at c-lab.de
Sun Feb 17 18:15:08 UTC 2002
Hello all!
I'm writing a command-class. A command is a string, which is related to
a function, which can be specified by the user. So it looks like that:
template <class T>
class Cmd : public String
public:
...
private:
T function;
};
I want to write it using a template, but I want to garantee, that T is
something like:
<return-type> (*typename)(arg-list)
i.e.
int (*intfunc)()
What can I do to restrict the user to be conform with this idea?
Thanks for any proposals. I need a way using normal c++ and no extra
classes.
Kindest regards
Julien
Julien Patrick Claassen
jclaassen at gmx.de
julien at c-lab.de
http://www.geocities.com/jjs_home
SBS C-LAB
Fuerstenallee 11
33102 Paderborn
Phone: (+49) 5251 60 6060
Fax: (+49) 5251 60 6065
www.c-lab.de
More information about the tuxCPProgramming
mailing list