| Christof Meerwald@freec++.prog | ||||
New Template Specialization Syntax> new_template_specialization.cpp:
template<class T2>
struct A
{
int f()
{ return 1; }
};
template<>
struct A<int>
{
int f()
{ return 0; }
};
int main(int argc, char *argv[])
{
A<int> a;
return a.f();
}
| ||||
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/new_template_specialization.html Last modified: Mon Sep 03 18:20:50 2018 |
Christof Meerwald <cmeerw@cmeerw.org> XMPP: cmeerw@cmeerw.org |