C++ Logo

std-discussion

Advanced search

Rditorial changes relative to an example in the section 13.8.2 Explicit instantiation

From: Vladimir Grigoriev <vlad.moscow_at_[hidden]>
Date: Wed, 31 Jul 2019 13:34:24 +0300
In the paragraph #4 of the section 13.8.2 Explicit instantiation there is the following example

template<class T> class Array { void mf(); };
template class Array<char>;
template void Array<int>::mf();
Should it be

template<class T> class Array { void mf(); };
template class Array<char>;
extern template void Array<int>::mf(); because there is no definition of the member function mf.

With best regards,
Vlad from Moscow

You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com

Received on 2019-07-31 05:36:25