Sure, this->p works without any harm.
But you get in trouble with this->getP<double>() Just try it :)
g++ -Wall template.cpp
template.cpp: In member function ‘void Child<B>::member()’:...
Type: Posts; User: Axl
Sure, this->p works without any harm.
But you get in trouble with this->getP<double>() Just try it :)
g++ -Wall template.cpp
template.cpp: In member function ‘void Child<B>::member()’:...
Ok, I expanded my problem a bit and found a solution for it.
The next problem was calling inherited member functions with templates.
That's my solution (found in the library "loki"):
...
Thank you! :)
If you have a dependency like this:
just use your nomal "includes" at the beginning with appropriate precompiler "ifndefs" like you showed it before and take care of the linker.
The linker...
Hi all,
I am a bit confused about the following piece of code (as a reduced part of an other problem, also related to templates):
template< const int A >
class Base
{
public:
inline...