M
Manuel Maria Diaz Gomez
Thanks Victor for your previous answer!
I have the following problem:
I would like to implement an interface class that defines a pure virtual
method that could take any parameter as input, void inlcuded.
The first idea was to use a template, but in that case void is not admited
as a type right?
i.e.
template<typename T>
class A {
virtual do_something(T) = 0;
};
Then, one of the derive classes can't just do :
do_something(){...}
Because the compiler will complain for void not being a type...
Any work-around this?
Cheers
Manuel
--
========================================================================
Manuel Diaz-Gomez | ATLAS Bldg. 32/SB-008 tel. +41 22 76 76304
CERN EP Division
CH-1211 Geneva 23
SWITZERLAND
========================================================================
I have the following problem:
I would like to implement an interface class that defines a pure virtual
method that could take any parameter as input, void inlcuded.
The first idea was to use a template, but in that case void is not admited
as a type right?
i.e.
template<typename T>
class A {
virtual do_something(T) = 0;
};
Then, one of the derive classes can't just do :
do_something(){...}
Because the compiler will complain for void not being a type...
Any work-around this?
Cheers
Manuel
--
========================================================================
Manuel Diaz-Gomez | ATLAS Bldg. 32/SB-008 tel. +41 22 76 76304
CERN EP Division
CH-1211 Geneva 23
SWITZERLAND
========================================================================