Last active
August 29, 2015 14:21
-
-
Save gchatelet/cf1ee50572e9e1c58831 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ ~/template_test.cc -c && nm template_test.o | |
struct A {}; | |
struct B {}; | |
template<typename TC> | |
struct C { | |
TC foo(TC) {} | |
}; | |
template<typename TD1, typename TD2> | |
struct D { | |
TD1 foo(TD1, TD2, TD1, TD2) {} | |
struct E { | |
template<typename TD3> | |
char bar(TD1,TD2,TD3) {} | |
}; | |
}; | |
template<typename A, typename B, typename C> | |
void baz() {} | |
template int C<int>::foo(int); // _ZN1CIiE3fooEi | |
template A C<A>::foo(A); // _ZN1CI1AE3fooES0_ | |
template C<A> C<C<A> >::foo(C<A>); // _ZN1CIS_I1AEE3fooES1_ | |
template int D<int, int>::foo(int, int, int, int); // _ZN1DIiiE3fooEiiii | |
template int D<int, A>::foo(int, A, int, A); // _ZN1DIi1AE3fooEiS0_iS0_ | |
template A D<A, A>::foo(A, A, A, A); // _ZN1DI1AS0_E3fooES0_S0_S0_S0_ | |
template A D<A, B>::foo(A, B, A, B); // _ZN1DI1A1BE3fooES0_S1_S0_S1_ | |
template char D<A,B>::E::bar<A>(A,B,A); // _ZN1DI1A1BE1E3barIS0_EEcS0_S1_T_ | |
template void baz<A,C<A>,A>(); // _Z3bazI1A1CIS0_ES0_Evv | |
template void baz<int, C<int>, int>(); // _Z3bazIi1CIiEiEvv | |
void barbaz(char (::D<A,B>::E::*)(A,B,A)) {} // _Z6barbazMN1DI1A1BE1EEFcS0_S1_S0_E | |
template<typename T> | |
void barbazt(char (::D<T,B>::E::*)(T,B,T)) {} | |
template void barbazt(char (::D<A,B>::E::*)(A,B,A)); // _Z7barbaztI1AEvMN1DIT_1BE1EEFcS2_S3_S2_E |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment