| Christof Meerwald@freec++.prog | ||||
Member Template Function> member_template_function.cpp:
template<class T>
struct A
{
public:
template<class U>
void f(U u)
{ }
template<class U>
void g(U u);
};
template<class T>
template<class U>
void A<T>::g(U u)
{ }
int main(int argc, char *argv[])
{
A<int> a;
int i = 0;
a.f(i);
a.g(i);
return 0;
}
| ||||
This Web page is licensed under the Creative Commons Attribution - NonCommercial - Share Alike License. Any use is subject to the Privacy Policy.
|
Revision: 1.2, cmeerw.org/prog/freecpp/member_template_function.html Last modified: Mon Sep 03 18:20:50 2018 |
Christof Meerwald <cmeerw@cmeerw.org> XMPP: cmeerw@cmeerw.org |