codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <iostream> template <typename T> struct Base { void f(int) { std::cout << "Base<T>::f\n"; } }; template <typename T> struct Derived : Base<T> { void g() { std::cout << "Derived<T>::g\n"; f(1); } void f(float) { std::cout << "Derived<T>::f\n"; } }; int main() { Derived<int> d; d.g(); }
Private
[
?
]
Run code
Submit