Lets say I have the following struct. How would I write the out-of-line constructor for this?
template <typename T>
struct foo
{
template <typename Bar>
foo(int n, Bar bar);
};
You would need two separate template declarations:
template <typename T>
template <typename Bar>
foo<T>::foo(int n, Bar bar)
{
// ...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With