相关代码 |
|
// Build don't link: // Test resolution of templatized overloaded constructors. // The more specialized constructor, i.e., A (const B &b) // should be chosen per \S 14.5.5.2/2 [temp.func.order/2]. template struct B { int f; }; struct A { template A (const B &b) {} template A (const T &b) {} }; int main () { B b; A a (b); return 0; }
相关资源 |
|