J
Jeff Williams
The common method of defining template classes and functions is to put the
definition and declaration into the same header file. Or at least I believe
it to be the common method and it is certainly the one I use.
This leaves me with a question.
As example, consider the following class.
template<class T>
class foo
{
public:
void my_big_func()
{
// non trivial code goes here that is something you wouldnt want
// to be inline
}
};
Now my question is, since all class functions declared and defined within
the class declaration are taken to be inline, does that mean all my template
class functions will be inline? If so how can I prevent this? and how can
I make the ones I want to be inline be inline.
My thought is I can not declare my template class memebers within the class
declaration, but this is extremely tedious and hard to maintain.
Jeff
definition and declaration into the same header file. Or at least I believe
it to be the common method and it is certainly the one I use.
This leaves me with a question.
As example, consider the following class.
template<class T>
class foo
{
public:
void my_big_func()
{
// non trivial code goes here that is something you wouldnt want
// to be inline
}
};
Now my question is, since all class functions declared and defined within
the class declaration are taken to be inline, does that mean all my template
class functions will be inline? If so how can I prevent this? and how can
I make the ones I want to be inline be inline.
My thought is I can not declare my template class memebers within the class
declaration, but this is extremely tedious and hard to maintain.
Jeff